Boost logo

Boost :

Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding
From: Jookia (166291_at_[hidden])
Date: 2012-10-31 12:56:33


On 01/11/12 03:41, Yakov Galka wrote:
> On Wed, Oct 31, 2012 at 4:07 PM, Thiel, Bjoern
> <bjoern.thiel_at_[hidden]>wrote:
>
>> Hi,
>>
>
> Hi,
>
>
>> developing platform independent code I really like the convenience
>> functions
>> conv::to_utf, conv::from_utf, and conv::utf_to_utf from locale.
>> Why not add something like conv::local8bit_to_utf and
>> conv::local8bit_from_utf
>> following the rational from filesystem (path encoding conversions):
>>
>
> Cannot talk for Artyom, but IMO there is little use to such functions. On
> Windows, 'ANSI' encodings exist solely for legacy reasons, and their use is
> limited to legacy code and code that gives up Unicode support in the first
> place. Boost.Filesystem uses 'ANSI' for narrow strings because Beman
> decided that compatibility with the dinkumware CRT implementation is more
> important than portability of Unicode correct code. The same is true for
> all other parts of boost (except Locale).
>
> If you are really into platform independent code, take a look at
> Boost.Nowide (http://cppcms.com/files/nowide/html/) waiting for review. In
> principle, on Windows, you need only two conversions: UTF-8 into UTF-16 and
> vice versa.
>
> Cheers,
>

Hello all.

Although this is right, I do think locales themselves should specify
legacy encodings if they're using them.

To my understanding wouldn't you be able to to from/to_utf and achieve
the same behaviour as wanted without using a separate set of functions?

Jookia.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk