Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download file using wget changing text encoding

The webpage I want do get has windows-1251 charset encoding. Is there a way to not just simply download this page, but automatically.. um.. convert the text inside to a uft-8?

I have tried to add additional parameters to wget like

--header='Accept-Charset: utf-8'

but no luck.

like image 654
Astro Avatar asked Mar 30 '13 18:03

Astro


1 Answers

You can use

iconv -f ISO-8859-1 -t UTF-8 ./index.html > ./utf.html

to convert the encoding. See https://wiki.archlinux.org/index.php/Convert_a_text_file%27s_encoding

like image 190
NoBugs Avatar answered Sep 22 '22 11:09

NoBugs