[vlc-devel] Possible patch for wxwidgets.hpp
Mark Moriarty
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
messages.
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
conversion.
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
longer blank).
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
sets?
For reference, I used this info from the wxwidgets site:
http://www.wxwidgets.org/manuals/2.6.3/wx_mbconvclasses.html
Thanks.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20061114/88ef047c/attachment.html>
More information about the vlc-devel
mailing list