$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [locale] Review
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-18 17:19:03
> Gevorg wrote:
> >
> > Calling std::locale::global(some_locale)
> > calls C function
> >
> > setlocale(LC_ALL,some_locale.name());
> >
> > So even if you can fix C++ code you can't do it
> > for C libraries you may use.
> >
> > Also 99.9% of C++ developers unaware of this issue and
> > almost nobody imbues std::locale::classic() because
> > they just not aware of the problem.
>
>
> Valid points, yet none of these is a design issue of the C++ standard library
> per se. You can write the example you mentioned earlier in this thread in a
> correct and reasonable way in C++, unlike in C. But developers need to be
> educated how, and I think this library can help with that by increasing the
> general awareness of localization-related issues in the C++ community.
>
There are two problems:
1. Every medium size C++ project uses C libraries. And they
will always be there.
2. When C++ locale's system is quite broken in its current state
and useless for most of users then you can't expect them
to be aware of such issues.
The other problem is that I hear complains about
it too frequently:
- libdbi mailing list is full of it and there is open bug
- SOCI has issues
- The problem with lexical cast rise once in a while in
Boost's list.
No, if something causes bugs too frequently then there
is something wrong with the concept.
Artyom