Boost logo

Boost Users :

Subject: Re: [Boost-users] Inconsistent unicode encoding between boost andwx onmac osx
From: Sachin Garg (schngrg_at_[hidden])
Date: 2010-02-13 18:31:38


On Sun, Feb 14, 2010 at 3:57 AM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Peter Dimov wrote:
>>
>> In the meantime, you could try
>>
>>   boost::filesystem::wpath_traits::imbue( std::locale( ".UTF-8" ) );
>
> Unfortunately, this
>
> http://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6-with-langenus-utf-8
>
> says that UTF-8 locales are broken on Mac OS X, so it probably won't work.
> Sorry.

Peter, I am guessing that the problem is not the OSX locale which
could be UTF-8 or UTF-16 or X (I am calling this 'source' encoding).

Problem *seems* to be that boost converts that X into UTF16 (or UTF32)
for storing it in wpath and that is using a normalization which is
incompatible with normalization used by wx for its UTF16 (or 32).
(Lets call this 'destination' encoding).

It seems that wpath_traits::imbue is way to specify 'source' encoding,
but maybe I need to change 'destination' encoding?

I am guessing all this from LARS' post above in this thread, so he
might correct me if I am off track :-)

SG


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net