|
|
@RokerHRO You wrote:
A char with value 0 in an UTF-8 string represents the Unicode character U+0000 and is nothing special at all. Yes, the NUL char is used in C as "string terminator" (and is considered as not part of the string) but that's a C thing, not a Unicode thing. If you have a C++ std::string than NUL char's in it are completely okay.
Unicode U+0000 is equivalent to ASCII NUL and one major feature of the UTF-8 encoding is that it is ASCII compatible, i.e. "old code" that was written to use ASCII only can still be used with UTF-8 encoding. In this Wikipedia article on UTF-8 you can read:
ASCII NUL characters can be used to split UTF-8-encoded data into null-terminated strings.
Can you give references that prove your point?
PS: "If you have a C++ std::string than NUL char's in it are completely okay." does IMHO not mean that C Strings with Unicode text in UTF-8 encoding (as used throughout FLTK) can not be terminated by NUL bytes. FLTK has both options in some functions: you can either specify a string and its length or only a string which must be NUL terminated. The latter can contain NUL bytes.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |