Boost logo

Boost :

Subject: Re: [boost] Silly Boost.Locale default narrow string encoding inWindows
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-10-27 16:17:53

> From: Alf P. Steinbach <alf.p.steinbach+usenet_at_[hidden]>
> [...]
> It is a level of indirection.
> You want Boost.Filesystem to assume /the same/ narrow
> character encoding as Boost.Locale, whatever it is.
> And to quote the docs where I found that program,
> "Boost Locale fully supports both narrow and wide API. The
> default character encoding is assumed to be UTF-8 on
> Windows."

I would probably say it once again and the last time.

1. Boost.Locale is **localization** library and localization
   today is done using **Unicode** not cp1252, cp936 or cp1255
   And UTF-8 is **Unicode** encoding for narrow strings.

   So _any_ localization library **must** use Unicode encoding
   otherwise it will be useless crap.

2. If you write software for Windows and what to use ANSI encoding
   by default all you need is to add a _single_ line into your code.

   I give you a choice to use whatever you want. But the default
   should be suitable for **Localization** - the reason this library
   is written for,

Now, you may not like the design of Boost.Locale library or you
don't like its defaults. Legitimate. But using UTF-8 by default
was one of few points that had total agreement between all
Boost.Locale reviewers.

Using UTF-8 by default is indeed strategical decision. You may
call it political, I may call it practical. You may do not like
it but this is what will remain because it is the way the library
designed and it is one of its central parts.

You don't like it? Ok... I had given you an option to change it.
I think you and other users will survive this one extra line
that changes the default encoding to ANSI instead of cross platform
and UTF-8.

Best Regards,

Artyom Beilis
CppCMS - C++ Web Framework:
CppDB - C++ SQL Connectivity:

Boost list run by bdawes at, gregod at, cpdaniel at, john at