[CentOS] Locales and filenames

Wed Oct 28 06:59:23 UTC 2009
Mogens Kjaer <mk at crc.dk>

On 10/27/2009 07:16 PM, Alfred von Campe wrote:
> 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:
...

If your locale is UTF8, íéèæøå would be multibyte characters.

If your characters are one byte only, they are not UTF-8.

vim knows how to handle this correctly:

If you open the file with vi (you would see the text
[converted] on the bottom line), and do:

:set fileencoding=utf-8

and write out the file again it should be converted so
that cat displays it correctly.

You can use the convmv script to convert filenames into
utf-8 (yum install convmv).

Mogens

-- 
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
Email: mk at crc.dk Homepage: http://www.crc.dk