How to Output Query Result as UTF-16 XML
Date: Tue, 10 Jun 2008 09:46:58 -0700 (PDT)
[Quoted] This is what I have done so far:
In Stored Procedure, I set-
* v_xml OUT NVARCHAR2
- v_xml := '<?xml version="1.0" encoding="UTF-16" ?>...'; -- without any chr(10) newline
In Application, I set-
[Quoted] * header('Content-Type: application/xml; charset=UTF-16');
- mb_convert_encoding($v_xml, "UTF-16");
However, my data fetch keeps throwing parse error in IE/Firefox. And I keep getting my data as ASCII (mb_detect_encoding($v_xml)), not UTF-16? According to http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#nchar, "there is no NCHAR or NCLOB support in the OCI8 extension." And http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf makes no mention of UTF-16.
I am not sure how to get UTF-16 XML (or, how to make character set to
SQLCS_NCHAR if that would help)?
Cheers, Bill Received on Tue Jun 10 2008 - 18:46:58 CEST