Page 2 of 2
Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 4:00 pm
by AlSith
I made the example with a simple Visual Studio project.
I have created and run the executable in Debug mode and it works fine.
Created a standard wxString
, I can print it correctly with any method, but the size of wxStringCharType is always 2 bytes.
Under OS Linux, the same example (but I have to create wxString with the method
Code: Select all
wxString s = wxString::FromUTF8("Ciao è");
) is printed correctly with the classic method
and the size of wxStringCharType is 1 byte.
Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 4:38 pm
by PB
FWIW, I was able to produce a MSW UTF-8 build and successfully launch a simple program using it:

- wxutf8.PNG (10.09 KiB) Viewed 613 times
(one can display this dialog by <Ctrl>+<Alt>+<MiddleClick> in an area not occupied by a child control).

- wxutf8-2.png (3.67 KiB) Viewed 612 times
I used nmake, had to modify WXWIN/build/msw/config.vc where I changed the line
to
I also used the define in the MSVS project properties in preprocessor symbols.
If you do not mind AlSith, I will ask about how to do this officially in wx-users mailing list.
Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 4:45 pm
by AlSith
PB wrote: ↑Mon Dec 23, 2019 4:38 pm
FWIW, I was able to produce a MSW UTF-8 build and successfully launch a simple program using it:
wxutf8.PNG
(one can display this dialog by <Ctrl>+<Alt>+<MiddleClick> in an area not occupied by a child control).
I used nmake, had to modify WXWIN/build/msw/config.vc where I changed the line
to
I also used the define in the MSVS project properties in preprocessor symbols.
Thanks.. I try now
PB wrote: ↑Mon Dec 23, 2019 4:38 pm
If you do not mind AlSith, I will ask about how to do this officially in wx-users mailing list.
Ok.. no problem... explain to me how I can help you and I will

Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 4:52 pm
by PB
Just make sure to make a clean rebuild of the library once you change the make config. I would also strongly recommend setting the same define in your project.
AlSith wrote: ↑Mon Dec 23, 2019 4:45 pm
PB wrote: ↑Mon Dec 23, 2019 4:38 pm
If you do not mind AlSith, I will ask about how to do this officially in wx-users mailing list.
Ok.. no problem... explain to me how I can help you and I will :D
I will just ask there, no help from you required, but thanks anyway. ;)
TBH, I am still not sure that you really want an UTF-8 build, for the reasons I described in my very first post in this thread...
Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 4:53 pm
by AlSith
PB wrote: ↑Mon Dec 23, 2019 4:38 pm
FWIW, I was able to produce a MSW UTF-8 build and successfully launch a simple program using it:
wxutf8.PNG
(one can display this dialog by <Ctrl>+<Alt>+<MiddleClick> in an area not occupied by a child control).
wxutf8-2.png
I used nmake, had to modify WXWIN/build/msw/config.vc where I changed the line
to
I also used the define in the MSVS project properties in preprocessor symbols.
Great.. it works..!!

Re: UTF-8 Build on Windows
Posted: Mon Dec 23, 2019 5:07 pm
by PB
I asked in wx-users about this, lets see what the answer is (probably only once holidays are over):
https://groups.google.com/forum/#!topic ... _tkJ20ilgU
See also this, regarding the "official" support for doing that
https://groups.google.com/forum/#!topic ... _tkJ20ilgU