[wx-dev] wxConvLocal and wxConvLibC was : Re: decomposed UTF8 for fn_str

Vaclav Slavik vslavik at fastmail.fm
Tue Dec 4 09:56:34 PST 2007


Hi

Stefan Csomor wrote:
> > Yes, we need to set the locale for CRT functions (and wx code
> > using them) to work as expected, regardless of whether we'll use
> > libc or CoreFoundation(?) for wxConvLocal.
>
> doing this results in a setlocale( 0 , "de_CH" ) that returns
> "de_CH" 

You should append ".UTF-8" to locale name if wxUSE_UNICODE=1, I think. 
Not sure about ANSI build, probably not.

>     const wxCharBuffer fn_str() const { return wxConvFile.cWC2WX(
> wc_str( wxConvLibc ) ); }
>
> fixes this problem, should I commit it ?

Sorry, why should this be needed -- doesn't your wxSetlocale() fix 
above cause wxConvLibc to behave in the same way as wxConvLocal? 
AFAIK it should, shouldn't it (if wxSetlocale is called at startup as 
on other platforms)?

thanks,
Vaclav


-- 
PGP key: 0x465264C9, available from http://pgp.mit.edu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.wxwidgets.org/pipermail/wx-dev/attachments/20071204/233f1b04/attachment.pgp


More information about the wx-dev mailing list