Sujet : Re: Rationale for aligning data on even bytes in a Unix shell file?
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.cDate : 27. Apr 2025, 19:32:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vult7f$1cn30$2@raubtier-asyl.eternal-september.org>
References : 1 2
User-Agent : Mozilla Thunderbird
Am 26.04.2025 um 17:00 schrieb Scott Lurndal:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
In a "C" file (of the Kornshell software) I stumbled across this
comment: "Each command in the history file starts on an even byte
and is null-terminated."
I wonder what's the reason behind that even-byte-alignment, on "C"
level or on Unix/files level. Any ideas?
Possibly to support 16-bit character sets?
Unix has a big problem that it doesn't support 16 bit character sets.
Win32 supported UCS-2 from the beginning and UTF-16 afaik since Windows
2000. With Unix there's even not a standard charset for the filesystem;
each filename character is just an octet.