Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to generate xml files with UTF-8 encoding from a Oracle 10g database in characterset WE8MSWIN125

Jura ThimaNov 13 2014 — edited Nov 13 2014

Hello, I am dealing with the following issue:

I am working with an Oracle 10g database. A lot of plsql is written to ouput xml files.

These xml files all have as first line <?xml version="1.0" encoding="UTF-8"?>

The database has characterset WE8MSWIN1252

The issue is that diacritic characters (such as á í ú é) stored in varchar2 table columns come out scumbled in the XML file, below is an example

example.JPG

As for as my knowledge goes, the issue is caused by the fact that my Database is in characterset WE8MSWIN1252 and the XML are encoded in UFT-8.

The issue disappears when I tweak my PL/SQL code in such a way that the XML files no longer show the encoding characterset in the first line: <?xml version="1.0"?>

But that is not an option.

So, How can I generate from my Oracle database XML files in UTF-8 with diacritic characters properly displayed?

All suggestions welcome,

THANKS.

Jura

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2014
Added on Nov 13 2014
1 comment
4,783 views