Sujet : Re: Rationale for aligning data on even bytes in a Unix shell file?
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.lang.cDate : 28. Apr 2025, 02:21:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vuml73$1riea$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.162 (Hmm4; 100b1318; Linux-6.14.4)
On Mon, 28 Apr 2025 02:53:45 +0200, Bonita Montero
<
Bonita.Montero@gmail.com> wrote in
<
vumjhf$20u1e$1@raubtier-asyl.eternal-september.org>:
Am 27.04.2025 um 21:55 schrieb Janis Papanagnou:
I think we have to distinguish the technical base size, an octet,
from the actual filenames. My Linux has no problem to represent,
say, filenames in Chinese or German umlaut characters that require
for representation 2 octets.
You're joking. Which applications currently can handle more than
a 7 bit characters with Unix files ?
_[/home/vallor/tmp]_(
vallor@lm)🐧_
$ touch 調和
_[/home/vallor/tmp]_(
vallor@lm)🐧_
$ ls
調和
_[/home/vallor/tmp]_(
vallor@lm)🐧_
$ ls -l
total 0
-rw-rw-r-- 1 vallor vallor 0 Apr 27 17:59 調和
ObC (What did I mess up here?):
$ cat readit.c
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
int main(void)
{
DIR * this = {0};
struct dirent * entry = {0};
char * s;
this = opendir(".");
while ((entry = readdir(this))!=NULL)
{
if(!strcmp(entry->d_name,".")) continue;
if(!strcmp(entry->d_name,"..")) continue;
for(s = entry->d_name; *s ; s++)
{
printf("%x\n",*s);
}
puts("---");
}
return 0;
}
-- -v