0

I have a website that works fine in most peoples PC's all the time. However, sometimes on some PC's (Windows) the encoding is done completely wrong and every word is written incorrectly. I don't mean just special characters, I mean every single character. For instance the word "ok" becomes "±µ" and the word "User" becomes "Ës»®".

I've the <meta charset="utf-8"> tag and the server requests seem to have the response content-type defined correctly.

Any ideas?

UPDATE - Just to add some more info, firstly all of this happened on Windows Chrome. We also noticed a pattern on the character translation that is happening:

Character u (u+0075, dec 117) becomes character « (u+00AB, dec 171) -> Difference of +36 hex and +54 dec

Character v (u+0076, dec 118) becomes character ª (u+00AA, dec 170) -> Difference of +34 hex and +52 dec

So every character seems to have been replaced by adding a value that is being subtracted 2 for each position.

ee11131
  • 51
  • 1
  • 6
  • "Seem"? [Check the server's response yourself](https://stackoverflow.com/a/56790467/4299358) if you're unsure and don't want to provide an example that we can verify. The resource itself could have an encoding other that what you advertize. – AmigoJack Jun 08 '21 at 18:30
  • It's not sufficient to just declare the encoding as UTF-8, you also have to ensure the HTML files are _saved_ as UTF-8 also. Read this: https://www.w3.org/International/questions/qa-changing-encoding – Moob Jun 08 '21 at 18:32
  • @AmigoJack everything about the server response looks fine. So does the file encoding. What blows my mind is that if the issue was any of those, shouldn't this happen all the time instead of rarely on some PC's? – ee11131 Jun 09 '21 at 07:06
  • This is still way too vague: you speak of "words" - does that imply that the HTML in the text file mysteriously stays the same for each character? Are the clients executed without any extensions running that could manipulate content? Is it reproducible? – AmigoJack Jun 09 '21 at 09:23

0 Answers0