Re: Rationale for aligning data on even bytes in a Unix shell file?

Liste des GroupesRevenir à c misc 
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.c
Date : 28. Apr 2025, 05:28:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vun04h$2fjrn$2@raubtier-asyl.eternal-september.org>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
Am 28.04.2025 um 03:21 schrieb vallor:
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;
}
 
https://stackoverflow.com/questions/38948141/how-are-linux-shells-and-filesystem-unicode-aware

Date Sujet#  Auteur
8 Jun 25 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal