Change my terminal's character set in Ubuntu

2

1

I would like to process with perl some files in Greek in which the character encoding is Greek (ISO-8859-7) but my terminal doesn't support such an encoding. Can I add it somehow?

user191878

Posted 2013-01-22T12:56:12.280

Reputation: 23

Answers

1

I will update this answer if you add more details about what exactly you need to do. On my system, using either terminator or gnome-terminal on a UTF-8 encoded Greek text file, I can use Perl to parse Greek:

$ cat test
Με λένε Μαρία
Με λένε Πόπη
Με λένε Κίτσο

$ file test
test: UTF-8 Unicode text

$ perl -ne 'print if /Πόπη/' test
Με λένε Πόπη

You can change the encoding of gnome-terminal like this:

enter image description here

Find and activate UTF-8. Then, you can change the encoding of your file using iconv:

iconv -f iso-8859-7 -t utf8  text.txt > new_text.txt

terdon

Posted 2013-01-22T12:56:12.280

Reputation: 45 216

i made it!!!i importet on my terminal the character encoding Greek (ISO-8859-7) and it workes fine!!! thnx again very usefull help!!!! – user191878 – 2013-01-22T14:49:47.247