Page 1 of 1

How to change a document's encoding

Posted: Mon Apr 18, 2016 10:27 am
by Albert Wiersch
I'm posting this here because it may benefit multiple people.

Today, most Internet documents should use UTF-8 encoding. If you have a page that is not UTF-8, like one that has one of these lines that specify ISO-8859-2 encoding:

Code: Select all

<META HTTP-EQUIV="Content-Type" content="text/html; charset=ISO-8859-2">
or

Code: Select all

<meta charset="ISO-8859-2">
Then it is recommended that you convert it to UTF-8. To do this:
  1. Load the document in CSE HTML Validator.
  2. Go to File->Save with Encoding and select "Unicode (UTF-8)" and make sure that the "Use encoding signature" option is not checked.
  3. Click OK to save the document with UTF-8 encoding.
Now change the old HTML to specify UTF-8:

Code: Select all

<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8">
or

Code: Select all

<meta charset="utf-8">
New in CSE HTML Validator v16.02

In CSE HTML Validator v16.02 and above, you can now hold down the 'Shift' key while selecting 'Save All' to select an encoding (like UTF-8) and use it to resave all opened documents with the selected encoding. You can then do a Search->Replace in All Open Documents operation to change 'ISO-8852-2' (or whatever encoding you are switching from) to 'utf-8'.

This is a quick way to convert multiple documents.