Linux filenames: UTF-8 encoded umlauts display as ??
Posted: Wed Apr 30, 2008 4:00 pm
[PROBLEM]
I am synchronizing files (for backup reasons) from Windows to Linux using rsync. Although special characters (e.g. german umlauts) are transferred correctly and encoded in UTF-8, they display as question marks (??) in the console (e.g. bash).
The distro I'm having that problem on is Devil-Linux.
[SOLUTION]
2 things:
a) my SSH client had to interpret the characters as unicode - in case of putty, check out this article about changing the translation to unicode.
b) The language of my console wasn't properly configured.
- First, list all available locales on your system:
(I did a "locale -a | grep de" to find all german locales)
- Then try if that solves your problem, by setting the environment variables "LC_ALL" and "LANG" to your locale. Here an example for "de_DE@euro" (german):
- If that did the trick, edit /etc/profile and add these 2 lines:
Devil-Linux already has 2 lines like this prepared in /etc/profile, but commented out by default.
[Open Issues]
Strange, but still not solved is the "sharp s" (ß) which won't display correctly in the commandline as output of an "ls", but displays perfectly on tab-completion. puzzling.
Through Samba however, things work perfectly.
I am synchronizing files (for backup reasons) from Windows to Linux using rsync. Although special characters (e.g. german umlauts) are transferred correctly and encoded in UTF-8, they display as question marks (??) in the console (e.g. bash).
The distro I'm having that problem on is Devil-Linux.
[SOLUTION]
2 things:
a) my SSH client had to interpret the characters as unicode - in case of putty, check out this article about changing the translation to unicode.
b) The language of my console wasn't properly configured.
- First, list all available locales on your system:
Code: Select all
locale -a- Then try if that solves your problem, by setting the environment variables "LC_ALL" and "LANG" to your locale. Here an example for "de_DE@euro" (german):
Code: Select all
export LC_ALL="de_DE@euro"; export LANG=$LC_ALLCode: Select all
export LANG="de_DE@euro"
export LC_ALL="de_DE@euro"Devil-Linux already has 2 lines like this prepared in /etc/profile, but commented out by default.
[Open Issues]
Strange, but still not solved is the "sharp s" (ß) which won't display correctly in the commandline as output of an "ls", but displays perfectly on tab-completion. puzzling.
Through Samba however, things work perfectly.