Re: Unicode: ugh!
- From: Ben Pfaff <blp@xxxxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 11:49:27 -0800
"osmium" <r124c4u102@xxxxxxxxxxx> writes:
"Ben Pfaff" writes:
The Unicode standard says this in section 3.9:
"For example, a string is defined as a pointer to char in the
C language, and is conventionally terminated with a NULL
character."
You'd think folks writing standards would bother to properly read
and understand the other standards that they reference.
What's your complaint? That the ASCII null should be spelled NUL?
Here is the definition of a string:
A string is a contiguous sequence of characters terminated
by and including the first null character.
A string is not a pointer to char: it is a sequence of
characters. It is not "conventionally" terminated by a null
character, it is always terminated by one (otherwise it is not a
string). In C, the null terminator is not a NULL character (NULL
is a null pointer constant); it is not the NUL character either,
because that assumes an ASCII character set; the null terminator
is in fact the "null character", as quoted above.
It's amazing how much they managed to get wrong in a single
sentence.
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.
- References:
- Unicode: ugh!
- From: Ben Pfaff
- Unicode: ugh!
- Prev by Date: Re: Can any one help me?
- Next by Date: Re: Optimizing C
- Previous by thread: Re: Unicode: ugh!
- Next by thread: Re: Unicode: ugh!
- Index(es):
Relevant Pages
|