Boost logo

Boost :

Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2012-11-06 06:54:15

What backend do you use, there are several applicable for Windows: - icu - based on ICU library - win32 - based on win32 API - std - based on standard C++ library They are selected in this order of compiled  in. 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,   Artyom Beilis -------------- CppCMS - C++ Web Framework: CppDB - C++ SQL Connectivity: >________________________________ > From: "Thiel, Bjoern" <bjoern.thiel_at_[hidden]> >To: "boost_at_[hidden]" <boost_at_[hidden]> >Sent: Tuesday, November 6, 2012 12:47 PM >Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding > > >________________________________________ >From: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] on behalf of Artyom Beilis [artyomtnk_at_[hidden]] >Sent: Thursday, November 01, 2012 09:57 >To: boost_at_[hidden] >Subject: Re: [boost] [locale] [filesystem] Windows local 8 bit encoding > >>________________________________ >> From: "Thiel, Bjoern" <bjoern.thiel <at>> >>To: "boost <at>" <boost <at>> >>Sent: Wednesday, October 31, 2012 4:07 PM >>Subject: [boost] [locale] [filesystem] Windows local 8 bit encoding > >Hi Artyom, > >> 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. > >Right - you can use them. But they are not very helpful. >If you want the SYSTEM locale on Microsoft Windows: >  generator locale_generator ; >  locale_generator.use_ansi_encoding( true ) ; >  wstring = conv::to_utf< wchar_t >( string, locale_generator( "" ) ) ; >unfortunately gives UTF-8 encoding as well. > >And if you want the CURRENT locale on Microsoft Windows, I simply can't >see how to get that. > >But why not add generator.generate( void ) giving exactly that. >Together with 'really' use_ansi_encoding( true ) it would be perfect. > >Best regards > >Bjoern. > >_______________________________________________ >Unsubscribe & other changes: > > >

Boost list run by bdawes at, gregod at, cpdaniel at, john at