Simon Kiely
Simon Kiely

Reputation: 6040

How can I fix my character encoding?

I have downloaded a set of web-pages and wish to simply have access to them locally (their online version has since been removed).

Loading them in chrome/Firefox, I am met with a large amount of unknown characters which render like so :

Image which shows many special chars displayed as a diamond with a question mark inside.

The HTML loads like so in Notepad++ :

Image showing character encoding as xE9 and xF1 and similar.

The image just shows one of the characters that causes an issue, however it is the same whenever an accented character is used or any special characters.

How can I fix this and make it render properly in my browser?

Upvotes: 0

Views: 837

Answers (2)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201528

Edit the files and insert the tag

<meta charset=windows-1252>

into the head part. The problem is apparently that the pages are windows-1252 encoded but treated as utf-8 encoded. It could be some other 8-bit encoding, too, so you may need to try different encodings.

Of course, it could be something more complicated, but there is not enough data to decide this.

Upvotes: 0

deceze
deceze

Reputation: 521995

Simply choose a different encoding from the View → Encoding menu in your browser.

The black diamonds specifically indicate that the browser is trying to interpret the page as Unicode (likely specifically UTF-8), which is apparently not the correct encoding. Try Latin-1, which will likely be correct.

Upvotes: 1

Related Questions