Boost logo

Boost :

Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-10-31 12:41:32


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,

-- 
Yakov

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