UTF-8

General TRichView support forum. Please post your questions here
Post Reply
Ohlenroth
Posts: 2
Joined: Fri Apr 13, 2007 6:42 am

UTF-8

Post by Ohlenroth »

I use rvxml and want to load and save UTF-8 enccoded text.
I set rvxml property encoding to utf-8
The rvedit component does the loading and saving correctly.

But further transformation of the exported XML file shows some wrong characters. Obviously encoding is not correct.

Are there any other properties/methods with the rvxml and rvedit components which I must set?

I tried UTF-16. This does not work at all

At the moment I manage with 8859-1 encoding but this also shows wrong characters in the range of #128 and #166.
What can I do?
any hints welcome
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

RVXML does not use encoding, it saves text as it is.
Ohlenroth
Posts: 2
Joined: Fri Apr 13, 2007 6:42 am

UTF-8

Post by Ohlenroth »

Yes, I understand that rvxml does not do any encoding.
My problem is, that I do not get all characters exported correctly.

What must I do to get a valid utf-8 encoded text from richviewedit components?
thanks
Markus
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I was wrong.
In the latest version of RVXML, if you specify Encoding='utf-8' (character case is not important), all text (both ANSI and Unicode items) must be saved in UTF-8 encoding. If it does not happen, this is a bug, please send me document reproducing it.
If any other encoding string is specified, no conversion is performed (ANSI text is saved as it is, Unicode is saved as &#NNNN codes). So, specifying UTF-16 as encoding will lead to broken XML.
Post Reply