Encoding of web pages

The file (html or php) containing the web page may be encoded with different character sets, for example ISO-8859-15 or UTF-8.

To see the encoding of a file, type for example :

file -i index.html

To convert a file from an encoding to another, for example from ISO-8859-15 to UTF-8, type :

iconv -f ISO-8859-15 -t UTF-8 mypage_iso.html -o mypage_utf8.html

The encoding may be declared by different ways, from the most prioritary to the less :

Links :