char16-t Questions

3

Solved

I have a simple question: Is there a way to do a strlen()-like count of characters in zero-terminated char16_t array?
Matterhorn asked 28/4, 2011 at 12:22

4

Solved

This code compiled OK under VS2013: std::string Unicode::utf16_to_utf8(std::u16string utf16_string) { std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> convert; retur...
Cleo asked 17/8, 2015 at 16:29

1

Solved

The following code works as expected. The source code, file "file.txt" and "out.txt" are all encoded with utf8. But it does not work when I change wchar_t to char16_t at the first line in main(). I...
Oust asked 24/12, 2016 at 17:57

1

Solved

C++11 introduces char16_t and char32_t to facilitate working with UTF-16- and UTF-32-encoded text strings. But the <iostream> library still only supports the implementation-defined wchar_t fo...
Triarchy asked 17/11, 2011 at 14:43

3

Solved

This is also related to char32_t and any intXX_t. The specification points out that: 2.14.3.2: The value of a char16_t literal containing a single c-char is equal to its ISO 10646 code point...
Erased asked 22/6, 2011 at 13:40

1

Solved

Recently I had a problem with porting a Windows application to Linux because of the wchar_t size difference between these platforms. I tried to use compiler switches, but there were problems with p...
Oskar asked 10/4, 2011 at 12:39

1

Solved

I'm buiding an API that allows me to fetch strings in various encodings, including utf8, utf16, utf32 and wchar_t (that may be utf32 or utf16 according to OS). New C++ standard had introduced new...
Frias asked 16/5, 2009 at 14:6
1

© 2022 - 2024 — McMap. All rights reserved.