EBCDIC control characters
Hans Åberg
haberg-1 at telia.com
Sat Jun 20 14:34:38 CDT 2020
> On 20 Jun 2020, at 16:45, Ken Whistler via Unicode <unicode at unicode.org> wrote:
>
> This whole issue has been a permanent confusion for C programmers, I think, largely because C is so loosey goosey about pointers, where a pointer is really just an index register wolf in sheep's clothing. With a char* pointer in hand, one cannot really tell whether it is referring to an actual C string following the null-termination convention, or a char array full of characters interpreted as a "string", but without null termination, or a char array full of arbitrary byte values meaning anything. And from that source flow thousands upon thousands of C program bugs. :(
The distinction can conveniently be indicated in C++, as in the example at the bottom of [1]: "…" converts as a C string which truncates at the first \0, whereas "…"s converts to a std::string that keeps track of the full length.
1. https://en.cppreference.com/w/cpp/string/basic_string/operator%22%22s
More information about the Unicode
mailing list