AndreaUnlimited / starfriends

16 stars 0 forks source link

Accents in tags send you to a weird URL #117

Open Cassolotl opened 7 years ago

Cassolotl commented 7 years ago

screen shot 2017-02-15 at 13 03 39

... points to here https://www.starfriends.org/tag/Pokémon-Go ...

screen shot 2017-02-15 at 13 04 05

And clicking the (5) on this:

screen shot 2017-02-15 at 13 05 57

... takes you here https://www.starfriends.org/tag/me/Pokémon-Go ...

screen shot 2017-02-15 at 13 06 51

MyAlternateAccount commented 7 years ago

The issue might be the page charset:

<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />

sets the charset to ISO-8859-1, but the server sends back the character in UTF-8: this page says the UTF-8 form of é is hex 0xc3a9, and the bytes that are getting sent back (é) are 0xc3 and 0xa9.

Setting the page charset like so:

<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />

should fix the problem, although I think the preferred way with HTML5 is simply

<meta charset="UTF-8" />

MyAlternateAccount commented 7 years ago

Worth noting that in theory this will only fix display, not search, although I suspect something similar might be causing this issue server-side (could be PHP's character set, or the database's character set...).