Hi all,
We are facing some encoding problems related to Japanese special characters. The whole thing boils down to the following analysis:
Create a file with filename is "ホンダ with contents ホンダ
$ pwd
/test
$ ls
ホンダ
$ cat ホンダ
ホンダ
$ cat ホンダ | od -x
0000000 83e3 e39b b383 83e3 0a80
0000012
$ ls | od -x
0000000 83e3 e39b b383 82e3 e3bf 9982 000a
0000015
The question is, why does the output from 'ls' produce more bytes when compared to the 'cat'? It looks like the filenames are encoded differently than the contents in each file
Any help on this would be great
Thanks,
Anand
We are facing some encoding problems related to Japanese special characters. The whole thing boils down to the following analysis:
Create a file with filename is "ホンダ with contents ホンダ
$ pwd
/test
$ ls
ホンダ
$ cat ホンダ
ホンダ
$ cat ホンダ | od -x
0000000 83e3 e39b b383 83e3 0a80
0000012
$ ls | od -x
0000000 83e3 e39b b383 82e3 e3bf 9982 000a
0000015
The question is, why does the output from 'ls' produce more bytes when compared to the 'cat'? It looks like the filenames are encoded differently than the contents in each file
Any help on this would be great
Thanks,
Anand