wxTextFile BOM

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Rob'
Knows some wx things
Knows some wx things
Posts: 48
Joined: Mon Dec 08, 2008 10:10 pm

wxTextFile BOM

Post by Rob' » Wed May 15, 2019 12:06 pm

Hello,

I'm using wxTextFile to read a file that contains the BOM for UTF8-encoding at the beginning of the file. After the work is done I write back the data to a new file. The new file should also contain the BOM. What I have to do to achieve that? Have I to do that manually? With wxTextFile::Write(wxTextFileType_None, wxMBConvUTF8()) the file is written in correct encoding, but w/o the BOM.

Thanks in advance
Rob'

catalin
Moderator
Moderator
Posts: 1511
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: wxTextFile BOM

Post by catalin » Wed May 15, 2019 12:23 pm

You have to do it manually AFAIK. Probably nothing changed about this since 2014.

Post Reply