Hello

XML allows you to specify the encoding of the document, otherwise it defaults to ISO-8859-1. [...] change it to <?xml encoding="UTF-8"?> if that isn't in the xml document or the very first item, add it.

The encoding was correctly specified in the XML document. The reason for the error was indeed the bug Oliver pointed at:

Note also that in configuration 1.1 final there was a bug that the encoding was not always taken into account (http://issues.apache.org/bugzilla/show_bug.cgi?id=34204). So you might want to check out the newest version from SVN.

With the current version of Commons Configuration (1.2 dev) the encoding is recognized correctly and all Chinese characters remain untouched. This works even without specifiying the encoding beforehand (by calling setEncoding() ). However, before saving a configuration to another XML document the setEncoding() method still has to be called or the file will not be stored in the desired UTF-8.

Thanks alot for helping me so quickly.

Best wishes,
Matthias


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to