How to Output Query Result as UTF-16 XML

From: Bill Wordsworth <>
Date: Tue, 10 Jun 2008 09:46:58 -0700 (PDT)
Message-ID: <>

[Quoted] This is what I have done so far:

In Stored Procedure, I set-

  • 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, "there is no NCHAR or NCLOB support in the OCI8 extension." And 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

Original text of this message