Hi there,
I am facing a problem with opening and writing into existing *.cpp files:
When I open a .cpp file as a wxTextFile, edit some lines, write and close the file again, the encoding changes from ASCII to UTF-8 (at least GIT tells me so). Is that a problem, if so how can I suppress this behaviour?
Thanks
Richard
wxTextFile encoding problem Topic is solved
-
- Experienced Solver
- Posts: 69
- Joined: Wed Feb 27, 2019 7:17 am
Re: wxTextFile encoding problem
wxTextFile::Open() and Write() methods take a "wxMBConv &conv=wxConvAuto()" parameter which is responsible for handling the encoding. Pass "wxConvLocal" there.
Use the source, Luke!
-
- Experienced Solver
- Posts: 69
- Joined: Wed Feb 27, 2019 7:17 am
Re: wxTextFile encoding problem
Thanks a lot dude, it works fine now!