Linux filenames: UTF-8 encoded umlauts display as ??

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Linux filenames: UTF-8 encoded umlauts display as ??

Post by ^rooker »

[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:

Code: Select all

locale -a
(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):

Code: Select all

export LC_ALL="de_DE@euro"; export LANG=$LC_ALL
- If that did the trick, edit /etc/profile and add these 2 lines:

Code: 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.
Post Reply