Database (11g) charset is US7ASCII and I'm trying to build some XML with UTF-8 encoding.
I'm using convert to handle (or so I'm thinking) the US7ASCII to UTF8 part.
Sample code:
declare
v_text2 varchar2(100);
v_text2_conv varchar2(100);
v_xml varchar2(1000);
begin
select building_name into v_text2 from adam_source; -- grab some multibyte data
select convert(trim(v_text2),'UTF8','US7ASCII') into v_text2_conv from dual; -- convert to UTF8
select xmlroot(xmlelement("test2",XMLCDATA(v_text2_conv)),version '1.0" encoding="UTF- 8').getclobval() into v_xml from dual; -- Build XML
dbms_output.put_line(v_xml); -- Display XML
end;
/
I get the error:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00216: invalid character 239 (0xEF)
Any pointers MUCH appreciated!
No comments:
Post a Comment