Namespaces
Variants
Actions

Talk:cpp/locale/locale/locale

From cppreference.com

These two lines generate an exception with MSVC/C++17:

`std::locale l1; // l1 is a copy of the classic "C" locale` `std::locale l2("en_US.UTF-8"); // l2 is a unicode locale`

"Unhandled exception at 0x74B5A932 in app_name.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00F3F5BC."

yes, Windows has no Unicode locale support --Cubbi (talk) 20:07, 3 May 2017 (PDT)

[edit] MVC++ 2017 isblank vs isspace

I am using VC++ (latest update) and was testing to see what isblank() is returning. It seems there are 2 versions of this function: C and C++ version.

The C version returned only horizontal tab(9) and space(32) as blank.

However, the C++ version returned the following as blank in the classic C locale:

9 10 11 12 13 32

I am wondering whether the result should have been the same regardless of which version of the function used.

Perhaps this is just a microsoft specific implementation?

I am a newbie and would appreciate any feedback.

seems like a known bug: MSConnect 3133397 --Cubbi (talk) 09:14, 19 November 2018 (PST)