1

I'm currently making a quiz-game with Construct 2 (HTML5), but I'm getting a problem with encoding when using interpunct (·), also known as middle dot. I'm currently generating an XML document with PHP. Encoding set to UTF-8.

  • All my documents is saved as UTF-8.
  • I have set MySQL tables to utf8mb4.
  • All HTML has meta charset set to UTF-8.
  • XML has encoding UTF-8.

If I set $conn->set_charset("utf8"); in the PHP document, it seems to be OK, but middle dot is returned as · in my game, but normal if I view the XML in browser.

If I don't set MySQL charset, it works in game, but I can't view it in the browser, but gets an encoding error on the middle dot line.

janlindso
  • 1,225
  • 3
  • 16
  • 41
  • Encoding issues are painful things.. This might help? http://stackoverflow.com/questions/11330226/how-to-write-special-charactersinterpunct-in-a-xml-file-in-java – Michael Krikorev Mar 19 '17 at 19:21

1 Answers1

0

Something is not set to utf8/utf8mb4 (or, outside MySQL, UTF-8). Search for "Mojibake" in Trouble with utf8 characters; what I see is not what I stored for discussion of what probably went wrong.

Or it could be "double encoded". So please follow the tips there (SELECT HEX...) to see if which you have:

C382C2B7  double encoding - bad
C2B7      utf8 -- should see this
B7        latin1 -- should not see this
Community
  • 1
  • 1
Rick James
  • 135,179
  • 13
  • 127
  • 222