Some math characters in AJAX string don't display

Bugs will be moved here once resolved.

Post » Mon Apr 01, 2013 6:15 pm

Link to .capx file (required!):

Steps to reproduce:
1. Use AJAX to request a string (via PHP) that includes a division sign ()
2. Display that string inside the program
3. Get angry at seeing a little black diamond with a question mark instead

Observed result:
Characters will display correctly.

Expected result:
A small black diamond with a question mark appears instead of the affected symbol.

I've done a decent amount of debugging. My PHP file DOES correctly get the character (from the database, but irrelevant really). If I simply go to the URL of the PHP file, there are no errors. The problem happens within Construct 2. Maybe it's some super obvious charset kind of thing that I don't know about, but I'm getting pretty sad.

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes

Operating system & service pack:
Windows 8

Construct 2 version:
Posts: 3
Reputation: 781

Post » Mon Apr 01, 2013 6:48 pm

Closing as not a Construct 2 bug; your server appears to be configured incorrectly. I checked the server headers for, and it sends the header "Content-Type: text/html". According to here if you don't specify a charset you either get ISO-8859-1, which is a character set that does not include a divide symbol, or the browser will take a wild guess. My guess is you're actually using UTF-8, in which case you absolutely must specify this using the "Content-Type: text/html; charset=utf-8" header. Otherwise you shouldn't expect anything to get transmitted correctly.

Character encodings can be a bit complicated, but if you 1) use UTF-8 everywhere, and 2) make sure all settings and transmission explicitly says it's UTF-8, then you shouldn't have any problems.
Scirra Founder
Posts: 23,122
Reputation: 180,543

Return to Closed bugs

Who is online

Users browsing this forum: gameglaux and 2 guests