Nathan Myers writes:
> Does the standard require any particular behavior in with NUL
> characters?
The standard describes the behaviour of the character types in terms of
character sets. This decouples glyphs, encoding, and storage. So
theoretically you could (AFAICT) define a character set that encodes some
meaningful character with code zero, but the implementation is not
required to handle this zero byte internally, it could catch it during
input and represent it with an escape code.
The standard also defines some possible "built-in" character sets, such as
LATIN1 and UTF16. Most of these do not naturally contain a character that
is encoded with the zero byte. In the case of the ISO8BIT/ASCII_FULL
charset, the standard explicitly says that the zero byte is not contained
in the character set.
In general, I don't see a point in accepting a zero byte in character
strings. If you want to store binary data there are binary data types (or
effort could be invested in them).
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter