"Hier staunt der Laie und Fachmann wundert sich."

Mittwoch, Mai 25, 2005

Garbled German Umlaute

Some special characters, like the German umlaute äöü, were not displayed correctly. First I thought it was only some poorly programmed web-pages but today I noticed that the same happens with file-names on an NTFS volume. So I dug a little deeper.

Note that I tried this stuff in the same order I state here. I did not take the time afterwards to check which steps were actually needed to reach the results.

First I thought that some locales might be missing. So I did
dpkg-reconfigure locales

to check and re-run the configuration scripts of the locales-package. I added de-DE-UTF (or so).

As I said before: I do not know if this step was really necessary. But whatever you do: do not change the default locale or it will mess up your existing files.

After that I restarted my X-Server (just in case) and the display of the special characters actually changed. Instead of mysterious squares it now showed
? (Ungültiger Unicode)
which was even more annoying not what I had wanted at all. Next, I tried to mount the NTFS with the iocharset=utf8 and the utf8 option. Both failed (and also told me that these options are deprecated and that the nls-option should be used). That put me on the right track: I needed reconfigure (and compile) my kernel with NLS-UTF8 support. NLS seemingly stands for Natural Language Support, and this is where you'll find it in menuconfig. I decided to add NLS-UTF8 as a module and while I was at it I also changed the NLS-default-codepage to "cp850" which stands for "Europe". (It had been set to "US".)

After recompiling and installing the kernel and restarting my machine I mounted the NTFS-volume with the option nls=utf-8 -- and lo and behold: all the German umlaute showed up nicely.

One last note: Afterwards I remembered a recent problem I had when using multisync to sync my PalmOS-device with Evolution. In Evolution, all umlaute were garbled (for every original umlaut-character I had two (or was it three) other characters in its place). This problem also disappaered afterwards.

I guess (but have not confirmed it) that adding the locale for de-DE-UTF corrected the sync-problem and is probably not related to the problem with the file-names on the NTFS-volumes. This was most likely solved solely by adding the correct nls-support to the kernel and mounting with the option nls=utf-8.