Commit 82ea3c0e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Attempt to fix Unicode wxWidgets interface on Win32

parent 647cc799
......@@ -87,27 +87,7 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
#define wxL2U(utf8) wxU(utf8)
#if wxUSE_UNICODE
/*
* Whoops, we assume that wchar_t is 32-bits and wide character encoding is
* UTF-32 (ok, both assumptions should de identical). This is not true on all
* platforms.
*
* On Windows, and possibly some other operating systems wchar_t is 16-bits,
* which means code points outside the Basic Multilingual Plane are encoded
* with surrogates as two subsequent wchar_t.
*/
# ifdef WIN32
/*
* Removing this #error without fixing the underlying problem is stricly
* FORBIDDEN. It would result in a _really_ completely unusable wxWidgets
* interface: all string operations would fail.
*
* Corrolary: Think twice, if not more, before you compile wxWidgets with
* Unicode on Windows.
*/
# error FIXME: this is not **REALLY** going to work at all.
# endif
# define wxFromLocale(wxstring) FromUTF32(wxstring.wc_str())
# define wxFromLocale(wxstring) FromWide(wxstring.wc_str())
# define wxLocaleFree(string) free(string)
#else
# define wxFromLocale(wxstring) FromLocale(wxstring.mb_str())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment