Boost logo

Boost :

Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2012-11-01 10:59:29


>> Using Boost.Locale you can convert to locale encoding of a given >> std::locale() object generated with Boost.Locale. >> >> boost::locale::generator allows to select legacy "ANSI" encoding >> instead of UTF-8 to be default upon creation of the locale object that >> corresponds to the system locale. >> >> This object you can use with to_utf and from_utf functions. > >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. > Similar to creating std::locale("") the generation  locale_generator.generate("") gives the expected result, i.e. system default locale. See: http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/locale_gen.html >Best regards > >Bjoern. > Regards Artyom Beilis


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk