Timeline for std::wstring VS std::string
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 12, 2015 at 22:57 | history | edited | Seppo Enarvi | CC BY-SA 3.0 |
A word of warning about UTF-16.
|
Oct 12, 2015 at 22:13 | comment | added | Seppo Enarvi | That's a good point. There's no reason why wstrings couldn't be used to store UTF-16 (instead of UCS-2), but then the convenience of a fixed-length encoding is lost. | |
Oct 12, 2015 at 21:23 | comment | added | Deduplicator | Sorry, sloppy comment. Should have said variable-length encoding. UTF-16 is a variable-length-encoding, just like UTF-8. Pretending it isn't is a bad idea. | |
Oct 12, 2015 at 21:18 | history | edited | Seppo Enarvi | CC BY-SA 3.0 |
terminology
|
Oct 12, 2015 at 21:16 | comment | added | Seppo Enarvi | Generally 16 and 32 bit encodings such as UCS-2 and UCS-4 are not called multibyte encodings, though. The C++ standard distinguishes between multibyte encodings and wide characters. A wide character representation uses a fixed number (generally more than 8) bits per character. Encodings that use a single byte to encode the most common characters, and multiple bytes to encode the rest of the character set, are called multibyte encodings. | |
Oct 12, 2015 at 20:46 | history | edited | Seppo Enarvi | CC BY-SA 3.0 |
explained "multibyte encoding"
|
Oct 10, 2015 at 12:44 | comment | added | Deduplicator | So, paraphrasing the first paragraph: Application needing more than 256 characters need to use a multibyte-encoding or a maybe_multibyte-encoding. | |
Apr 23, 2015 at 9:04 | history | edited | Seppo Enarvi | CC BY-SA 3.0 |
fixed grammar
|
Sep 11, 2011 at 9:28 | history | answered | Seppo Enarvi | CC BY-SA 3.0 |