This is needed so that samples/etc/choice.rb shows the strings in the choice box. One of the few places that missed UTF8 convertion. --- swig/classes/Choice.i 31 Jan 2005 04:18:52 -0000 1.2 +++ swig/classes/Choice.i 24 Jul 2005 19:18:55 -0000 @@ -14,7 +14,7 @@ for(int i=0; i < $1; ++i) { VALUE thisItem = rb_ary_entry($input, i); - $2[i] = (wxChar *)STR2CSTR(thisItem); + $2[i] = wxConvUTF8.cMB2WC(STR2CSTR(thisItem)); } } There''s another I think UTF8 problem: The onAbout dialog in caret.rb uses the (c) character so the string is not shown. Jani
Jani Monoses wrote:> This is needed so that samples/etc/choice.rb shows the strings in the > choice box. > One of the few places that missed UTF8 convertion. > > --- swig/classes/Choice.i 31 Jan 2005 04:18:52 -0000 1.2 > +++ swig/classes/Choice.i 24 Jul 2005 19:18:55 -0000 > @@ -14,7 +14,7 @@ > for(int i=0; i < $1; ++i) > { > VALUE thisItem = rb_ary_entry($input, i); > - $2[i] = (wxChar *)STR2CSTR(thisItem); > + $2[i] = wxConvUTF8.cMB2WC(STR2CSTR(thisItem)); > } > }Ah, yes. My goal would be that none of the class .i files would need to contain typemaps or otherwise muck with low-level stuff like this. I''ll apply your patch (assuming it works for me), but will hope to find a better long-term solution.> There''s another I think UTF8 problem: The onAbout dialog in caret.rb > uses the (c) character so the string is not shown.Good catch. I''ll make a note to do something about this as well. Thanks, Kevin
Kevin Smith wrote:> Jani Monoses wrote: > >> This is needed so that samples/etc/choice.rb shows the strings in the >> choice box. >> One of the few places that missed UTF8 convertion. >> > > Ah, yes. My goal would be that none of the class .i files would need to > contain typemaps or otherwise muck with low-level stuff like this. I''ll > apply your patch (assuming it works for me), but will hope to find a > better long-term solution.I finally got around to checking in your temporary solution. Kevin