From: Joachim Wiesemann on
Hi,

I want to create and write a wxTextFile as Unicode (UTF16). Reading
Unicode (UTF16) works fine, just writing always writes UTF8. (I'm using
2.8.10 and Unicode build.)

Is there any trick how to do this?

Joachim

--
Dr. Joachim Wiesemann
http://jwiesemann.com/ Electrical Engineering, Usability
From: Vadim Zeitlin on
On 2009-12-29, Joachim Wiesemann <newsantwort.xyz(a)jwiesemann.de> wrote:
> I want to create and write a wxTextFile as Unicode (UTF16). Reading
> Unicode (UTF16) works fine, just writing always writes UTF8. (I'm using
> 2.8.10 and Unicode build.)
>
> Is there any trick how to do this?

Pass a wxMBConvUTF16 (or wxMBConvUTF16LE if you want your data to be
portable to big endian platforms) as second argument to
wxTextFile::Write().

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/