Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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: askubuntu.com/questions/56668/character-encoding-in-ubuntu –  N.N. Aug 11 '11 at 9:26

2 Answers 2

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

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.