Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have web page its charset is 8859-9 and it was prepared in windows with char encoding ascii. from ftp access, I am opening it via gedit in ubuntu then turkish chars changes like (turkish ı became ý). what can I do to avoid this kind of stupid things?

share|improve this question
Same question, same author: – N.N. Aug 11 '11 at 9:26
up vote 0 down vote accepted

Have you tried setting your locale to tr_TR.ISO-8859-9

To find out what your current locale is, use the locale command with no arguments. It will print the values of all of the relevant environment variables except for LANGUAGE. locale charmap prints the name of the current encoding. To find out what locales are available, type locale -a. To find out what encodings are available, type locale -m.

If you use gedit's file-open dialogue you can choose an appropriate encoding for the file you are opening.

If the above doesn't help, please update your question with the output of file filename and ten relevant lines of output of hexdump -C filename

what can I do to avoid this kind of stupid things?

Use utf-8 for everything everywhere at all times. Convert anything that isn't utf-8 into utf-8 using iconv or recode. Make sure all the fonts you use support the scripts you use (i.e. have glyphs for the relevant unicode ranges).

share|improve this answer
thanks it works in fedora. when I open the file from ftp remote serve. chars are in correct shape. – edib Aug 11 '11 at 13:20

You can convert with iconv:

$ iconv -f iso-8859-1 -t utf-8 somefile.latin1 > somefile.utf8


An alternative to iconv is to recode. If not already known, you can find out the out the the charset with the file command:

$ file somefile.latin1
somefile.latin1: ISO-8859 text

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .