file-name encoding problems

4

I googled over this topic but couldn't find what I was looking for... the following "happend" to me:

I had my files stored on a NTFS-USB Harddisk, because of space problems I moved them to an ext3 system....somehow the filename (content is still ok as far as I saw) encoding screwed up....my files look like the following now:

Kküken <--- should have an "ü"
Jäger <--- should be an "ä"
Zwölf <--- should be an "ö"
fünfte <-- should be an "ü"
etc ....

These are just examples, but already give me my first question Why has the "ü" two different representations? (Maybe I screw up, before I screw up and now I have a mixing of x different encoding-layers? :) )

I tried the following command:

convmv -r -f UTF-8 -t ISO-8859-1  *

This command work for some files (for example Zwölf) but not for all:

iso-8859-1 doesn't cover all needed characters for: "fünfte"

So Iguess it must be another encoding - but which? How can I find out this?

And is there any way that I can still fix all of this?

tenhouse

Posted 2012-11-05T21:56:29.123

Reputation: 153

Answers

2

I copy and paste the 4 lines into a text file, then open it in firefox. the Browser auto detect it to be UTF-8 and display following

Kküken <--- should have an "�"
Jäger <--- should be an "�"
Zwölf <--- should be an "�"
fünfte <-- should be an "�"

Your original copy did not "screw up", it pickup NTFS unicode file name correctly. Instead it seems your display/tty/font does not support UTF8/unicode output.

Maybe try to look at your copy in X windows environment.

John Siu

Posted 2012-11-05T21:56:29.123

Reputation: 4 957

thought of that too, I'm accessin primary via samba share with a windows 8 /windows 7 machine, there the special chars are mostly replaced with "_" :S – tenhouse – 2012-11-07T15:00:30.470

I apology for my stupidity, I realized just now that you weren't talking about windwos, but about x. So I installed xfe (didn't have anything installed because I dont need it) and you were absolutely right, there everything is perfect! So i changed my putty use utf8 and now there its fine too. What's left now: Samba, I guess there is also a setting for that... and another problem is that my dlna software (which is installed on the same machine) can't read the files with the "special chars"... – tenhouse – 2012-11-07T15:41:18.257

and my third and last answer, I set "unix charset = UTF-8" in the samba config...everything seems fine now. Thank you! – tenhouse – 2012-11-07T15:56:59.530