Prev: wxSSL
Next: Linking Eorrs Help required
From: Franky Braem on 27 Oct 2006 16:27 I've got a problem when trying to run wxJS on Ubuntu: SpiderMonkey (the JavaScript engine) uses 2-bytes (jschar) to represent a unicode string. wxWidgets uses wchar_t which uses 4-bytes on Linux. Is there a way to make a conversion from a wxString (encoded in UTF16) to a jschar? I don't need this on Windows, because windows also uses 2-bytes for wchar_t. I know you can build an application with -fshort-wchar but this option can break compatibility between other applications. Franky.
From: Vadim Zeitlin on 27 Oct 2006 16:36 On Fri, 27 Oct 2006 22:27:53 +0200 Franky Braem <f.braem(a)skynet.be> wrote: FB> SpiderMonkey (the JavaScript engine) uses 2-bytes (jschar) to represent FB> a unicode string. wxWidgets uses wchar_t which uses 4-bytes on Linux. Is FB> there a way to make a conversion from a wxString (encoded in UTF16) to a FB> jschar? Yes, use wxMBConvUTF16. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
From: Milan Babuskov on 28 Oct 2006 07:59 Franky Braem wrote: > SpiderMonkey (the JavaScript engine) uses 2-bytes (jschar) to represent jschar is UTF-16 > a unicode string. wxWidgets uses wchar_t which uses 4-bytes on Linux. Is > there a way to make a conversion from a wxString (encoded in UTF16) UTF-16 is not 4-bytes. 16 stands for 16 bits, i.e. 2 bytes. > I don't need this on Windows, because windows also uses 2-bytes for > wchar_t. It's because Windows API uses UTF-16 for everything. -- Milan Babuskov http://njam.sourceforge.net http://www.flamerobin.org --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
From: Franky Braem on 30 Oct 2006 15:12 Milan Babuskov wrote: > Franky Braem wrote: >> SpiderMonkey (the JavaScript engine) uses 2-bytes (jschar) to represent > > jschar is UTF-16 > >> a unicode string. wxWidgets uses wchar_t which uses 4-bytes on Linux. >> Is there a way to make a conversion from a wxString (encoded in UTF16) > > UTF-16 is not 4-bytes. 16 stands for 16 bits, i.e. 2 bytes. > I know. But wxString uses wchar_t, which is 4 bytes on Linux, and 2 bytes on Windows.
|
Pages: 1 Prev: wxSSL Next: Linking Eorrs Help required |