Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8570: boost::locale::generator::use_ansi_encoding bug: gives the unexpected result on Win7 Chinese.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-14 13:09:01
#8570: boost::locale::generator::use_ansi_encoding bug: gives the unexpected
result on Win7 Chinese.
-------------------------------+--------------------------------------------
Reporter: 316293804@⦠| Owner: artyom
Type: Bugs | Status: new
Milestone: To Be Determined | Component: locale
Version: Boost 1.53.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------
Comment (by anonymous):
Replying to [comment:2 artyom]:
> What backends are compiled in? Does ICU compiled in? Does std backend
compiled in? What compiler?
>
> Note: winapi backend (which is default on windows if ICU is not present)
does not support ANSI encoding. So you need to specify std backend
explicitly or use ICU.
Thanks, I was complied in VS2010,and not use ICU. But follow ways not to
specify std backend explicitly. Only to use locale("");
1.
{{{
setlocale(LC_CTYPE,"");
wcstombs(string, wstring, _MAX_FNAME);
}}}
2.
{{{
std::locale sys_locale("");
std::use_facet<std::codecvt<wchar_t,char, mbstate_t>
>(sys_locale).out(...);
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8570#comment:4> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC