Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sending UTF-8 data via http post

LmocsiNov 27 2010 — edited Nov 28 2010
Hello,

I'm generating an xml to be sent via http post method. Before sending, I'd like to convert it to utf-8, but Oracle converts it to utf-16, no matter what I do.

This is what I send with utl_http.write_text:
   convert(l_clob,'AL32UTF8')
...but I see utf-16 encoded output on the server side.

NLS_RDBMS_VERSION is 10.2.0.1.0
NLS_CHARACTERSET is EE8ISO8859P2
NLS_NCHAR_CHARACTERSET is AL16UTF16

But I do not use NCHAR variables.
Is http post considered like exporting, where the os's NLS_LANG is important?

Earlier, I managed to save utf-8 xml-files without setting any NLS% params. It was with:
        UTL_FILE.PUT_RAW(
            file   => file_handle,
            buffer => UTL_RAW.CONVERT(utl_raw.cast_to_raw(buffer),
                                      'AMERICAN_AMERICA.AL32UTF8',
                                      'AMERICAN_AMERICA.'||charset
                                      )
          );
But this does not seem to work here, since I have to send 'text/xml'...
Any help is appreciated.

Thanks,
Laszlo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2010
Added on Nov 27 2010
2 comments
350 views