
________________________________ From: "Thiel, Bjoern" <bjoern.thiel@mpibpc.mpg.de> To: "boost@lists.boost.org" <boost@lists.boost.org> Sent: Tuesday, November 27, 2012 1:52 PM Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding
Hi Artyom,
Currently win32 API supports only UTF-8 encodings, so you need to one of:
- compile with ICU - select std backend (because the default without ICU on windows is win32) - disable win32 backend (in build options) so only std backend would be used. But you should note that under Windows only MSVC has std backend support, for gcc and ANSI encodings you need ICU,
Is there reason why win32 and std backend behave differently here?
Yes because they are entirely different backends. Implementing ANSI encoding support under win32 backend required significant effort, and because ANSI encodings were deprecated by Windows in favor of Unicode it was decided not to support ANSI encodings.
Using std locale get_system_locale() method works for code pages of the form 'windows-XXX'. Others e.g. 'Shift_JIS' should fail.
In generally for locakes with Shift_JIS it shoudl return stuff like ja_JP.windows-932 (which is shift_jis) Is there problem with that?
And if you want the CURRENT locale on Microsoft Windows, I simply can't see how to get that.
What do you mean, what kind of CURRENT locale do you need?
But why not add generator.generate( void ) giving exactly that.
Once again, what do you mean.
Best regards
Bjoern.
Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/