Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is my linux box:

  • CentOS Linux release 6.0 (Final)
  • x86_64

Using a text editor (vi, or pico...) I see strange characters for accented letters (è, ì, à, ù)

This is my locale:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

If I switch to iso-8859-9 like this:

export LANG="en_US.ISO-8859-1"

I see the characters correctly, but I must use utf-8 on this server.

Any idea?

share|improve this question
add comment

1 Answer

Your description is vague. Either your terminal does not support Unicode, or you're editing a file that's in latin1 (= iso-8859-1).

On a bash or zsh shell, with LC_CTYPE=en_US.UTF-8, run echo $'\xc3a9'. If you see é, your terminal supports UTF-8. If you see é, your terminal is showing latin1.

If your terminal doesn't support UTF-8, you need to get one that does. Or, possibly, configure yours so that it does.

If you determine that your terminal supports UTF-8, but you see things like é when you display a file that contains é, then the problem is that your files are encoded in latin1. Recode them to UTF-8.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.