
On 02/11/12 01:43, Thiel, Bjoern wrote:
Unfortunately that does not work under Microsoft Windows as generator locale_generator ; locale_generator.use_ansi_encoding( true ) ; std::locale const current_locale = locale_generator.generate( name ) ; needs a name.
If I use the application locale name std::string const name = std::locale().name() ; I get "C" which gives me "US-ASCII" encoding and not the "windows-1252" encoding I have.
Even if I use the system locale name std::string const name = std::locale( "" ).name() ; I get "English_United States.1252" which gives me the codepage "1252" as encoding and not "windows-1252" either (conv::to_utf and conv::from_utf just throw "Invalid or unsupported charset:1252" in this case).
Best regards
Bjoern.
Hey! Sorry if this sounds silly, but have you tried util::get_system_locale? Jookia.