[vlc-devel] Possible patch for wxwidgets.hpp
mfmbusiness at earthlink.net
Wed Nov 15 02:31:39 CET 2006
Wxwindows has been out of commission for at least a couple days on trunk, a
problem with unicode conversion.
Specifically, I have been noticing the trouble opening files -- you can
select a file, but it doesn't actually open. Also, if you select
View-Messages, you get a lot of lines that aren't actually outputting the
Best I can tell, this is due to some issue relative to implementing the
wxwidgets.hpp wxFromLocale function, that it isn't getting a clean
I freely admit I do not know what the goal is, but from my admittedly lame
review of the code I believe it is to convert from unicode input strings to
multibyte internal representation. Is this correct?
I edited the wxFromLocale function in wxwidgets.hpp, replacing it with:
static inline char *wxFromLocale (const wxString& string)
#if defined( wxUSE_UNICODE )
# if defined( WIN32 )
return (char *) wxConvCurrent->cWX2MB(string);
# define wxLocaleFree free
(rest of the definition is unchanged)
Basically, I skip the call to FromWide in charset.h, which then invokes the
Windows API call WideCharToMultiByte, and just use a wx built-in function.
I compiled it with my unicode build of wxwindows.
I am now able to successfully open files, and also see expected Messages (no
Could someone who knows what the intent of the conversion is take a look at
this patch and, hopefully, perhaps test it with some non-Western character
For reference, I used this info from the wxwidgets site:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel