On 21 September 2011 15:29, eric.kow <eric....@gmail.com> wrote: > > On Tue, Sep 20, 2011 at 20:57:37 +0100, Dave Tapley wrote: > > Am I correct in recalling that you did some of the work to get wxHaskell > > supporting unicode? > > That's right. Mostly swapping char with w_char > > > Now the good news is that this is almost certainly related to the changes to > > unicode handling in wxWidgets: > > http://docs.wxwidgets.org/2.9/overview_changes_since28.html > > Ouch, seems to make sense. > > Was dimly aware that wxWidgets 3.0 would be changing the string type but > I guess I let wishful thinking fool me into thinking it didn't affect > wxWidgets 2.9 (not really paying enough attention to the numbering) > > -- > Eric Kow <http://erickow.com>
Some more updates on this.. Presuming that the Prelude.chr error was due to some unicode shenanigans I built wx 2.9.2 with --disable-unicode (so "wx-config --list" now reports that "Default config is gtk2-ansi-2.9". After doing so I tried to recompile wx and wxcore against, unfortunately we now get a bunch of compilation errors of this form: src/cpp/eljdnd.cpp:222:0: error: cannot convert ‘wchar_t*’ to ‘const wxChar*’ in assignment I figured with makes sense (although I'm not sure why it wasn't an issue when building against 2.8) when you look at line 222: ((const wxChar**)_lst)[i] = wxStrdup (arr.Item(i).wchar_str()); In 2.9.2 that call to 'wchar_str' is documented as: "Returns an object with string data that is implicitly convertible to char* pointer"[1], that doesn't sound that bad. If you look at 'char_str'[2] it has the same documentation *but* it has a default parameter (const wxMBConv & conv = wxConvLibc), I rather hoped that 'conv' object would take care of everything, and so I changed all the 'wchar_str()'s into 'char_str()'s (and I've attached a patch with that done). The good news is it now compiles successfully, and the Prelude.chr error has gone away, but now we only get the first character of every string displayed. This leads me to think that the 'conv' object isn't doing its job properly, perhaps because 'wxConvLibc' isn't set correctly? Dave, [1] http://docs.wxwidgets.org/2.9/classwx_string.html#3d9337b865b8962e172c2589409c6876 [2] http://docs.wxwidgets.org/2.9/classwx_string.html#edcaea87fc347a940263a533bd56846f
use_char_str_instead_of_wchar_str
Description: Binary data
------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________ wxhaskell-devel mailing list wxhaskell-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel