Reputation: 718
How can one change the file encoding from linux (Fedora 20) command line? I have a huge CSV file 7GB and I don't wish to open it.
Upvotes: 1
Views: 3969
Reputation: 718
file -bi /path/to/file.csv
the result should look something like
"text/plain; charset=us-ascii"
iconv -f inputEncoding -t outputEncoding /path/to/input/file.txt -o path/to/output/file.txt
for example:
iconv -f iso-8859-1 -t utf8 ~/Documents/bigger_not_filtered.csv -o /tmp/utf8_bigger_not_filtered.csv
Upvotes: 2