On 3/27/25 8:19 PM, Rob Pike wrote:
What is a "character" according to POSIX? I
suspect it's just a byte, which
is a long-outdated definition, the char keyword notwithstanding.
"3.58 Character
A sequence of one or more bytes representing a member of a character set.
Note:
This term corresponds to the ISO C standard term multi-byte character,
where a single-byte character is a special case of a multi-byte character.
Unlike the usage in the ISO C standard, character here has no necessary
relationship with storage space, and byte is used when storage space is
discussed.
See the definition of the portable character set in 6.1 Portable
Character Set for a further explanation of the graphical representations of
(abstract) characters, as opposed to character encodings."
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html#ta…
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet(a)case.edu
http://tiswww.cwru.edu/~chet/