If I want to make the following work on Windows, what is the correct locale and how do I detect that it is actually present: Does this code work universaly, or is it just my system?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
Although there isn't good support for named locales, Visual Studio 2010 does include the UTF-8 conversion facets required by C++11:
std::codecvt_utf8
for UCS2 andstd::codecvt_utf8_utf16
for UTF-16:this outputs, on my Visual Studio 2010 EE SP1
Per MSDN, it would be named "english_us.65001". But code page 65001 is somewhat flaky on Windows.
Basically, you are out of luck: http://www.siao2.com/2007/01/03/1392379.aspx