
Artyom wrote:
Gevorg Voskanyan wrote:
Artyom wrote:
It is design issue of standard C and C++ library.
While I agree about the standard C library, what issue does C++ standard library
have here? You can just imbue std::locale::classic() and you are good to go. Am I missing
something?
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. Gevorg