0

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?

1 Answer 1

6

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.