On 10/27/2009 02:16 PM Alfred von Campe wrote:
On Oct 27, 2009, at 13:40, Niki Kovacs wrote:
I vaguely remember Mac uses UTF-16 as default encoding. This could be the source of your problem.
Forget I said anything about the Mac; I'm only using it to write these emails. The file in question was completely created on Linux. The filename contains the character 0xE7 (c with cedilla) and the file itself contains the character 0xED (i acute). Neither character is displayed correctly using ls (filename) or cat (content), but I can look at the file with vim. Here is some output cut&pasted from my xterm window to illustrate the issue:
bash-3.2$ ls -l XXX* -rw-r--r-- 1 av16209 GRP-HEPDSW 22 oct 27 14:11 XXX? bash-3.2$ cat test.sh #!/bin/sh echo "This is an i acute: � > XXX� bash-3.2$
I have also attached a gzip'ed test.sh.
Alfred
Alfred,
Seems to me that the value of the (badly displaying) characters are being preserved, but they're not being displayed properly. That is, the shell isn't accessing the correct font set(s). Your report also tells us that cim is somehow capable of grabbing the correct fonts. To verify this, make vim create the file names (in the languages in question). E.g., create a file with vi with just one German/Greek/French word, say, Έντελέχεια (Entylecheia, an ancient Greek word). If the name of the file is "nonenglish", then, after you do your save in vim, run the shell commands
touch temp; mv temp $(cat nonenglish)
This should rename the temp file to the Greek word inside of the nonenglish file. If I'm understanding you correctly, the Greek word should appear fine inside of vim, but will be butchered by the shell. Then do
ls > dirfile; vi dirfile
and see if the Greek word appears correct again in vim.
Tell us what you find.