How to unzip the Portuguese file

0

I have a zip file containing data in Portuguese. When I try to unzip the file

$ unzip abc.zip

It creates a file "abc.csv" but when I try to look into data, I get "?" instead of characters like "รก". My LANG settings on shell looks like:

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

I will appreciate any help on this.

ASingh

Posted 2014-03-18T01:22:45.810

Reputation: 101

Answers

1

Most probably, you can blame your editor which is not able to understand either ISO-8859-1 or UTF-8 format. The iconv command comes in handy in these situations; try to convert the csv file both ways (ISO-8859-1 -> UTF-8 and UTF-8 -> ISO-8859-1, since I don't know which one is your original codification), and check whether at least one of those newly created files is read correctly afterwards:

$ iconv -f UTF-8 -t ISO-8859-1 abc.csv > abc-latin1.csv

$ iconv -f ISO-8859-1 -t UTF-8 abc.csv > abc-utf8.csv

asamarin

Posted 2014-03-18T01:22:45.810

Reputation: 196