Garbage Characters

Discussion and feedback on Construct 2

Post » Mon Nov 07, 2011 2:23 pm

Hi,
I'm new here and i did one webapp to a client with C2. Until now everything is working, but my client reported an strange thing, which is challenging me. When opened in Mozilla there are some letters, see the picture, which came from nowhere! If I open the code in mozilla they are before the start of page, like you can see in this picture.

Somebody knows why this happens?

Thanks
B
90
S
5
G
8
Posts: 164
Reputation: 7,646

Post » Mon Nov 07, 2011 2:33 pm

Hey I forgot to put the link to the webapp, to you can see it "in loco".
B
90
S
5
G
8
Posts: 164
Reputation: 7,646

Post » Mon Nov 07, 2011 2:36 pm

Apparently those characters lies in the index.html file of your exported project.
Simply delete them there (you might wanna check this tutorial for more infos).
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Nov 07, 2011 3:00 pm

It's a problem with your server.

Those characters are usually hidden: they mark the file as being encoded with UTF-8 (unicode). All files and text used by Construct 2 are encoded in UTF-8 to ensure it works in all languages across the world.

However, your server is set up differently and appears to try to force the ISO-8859-1 character set instead of UTF-8. I guess your server is set up to serve Portuguese text, and this conflicts with the UTF-8 text in the HTML. Note that only Firefox gets confused and displays the UTF-8 marker: Internet Explorer and Chrome seem to still figure out that they should use UTF-8. Using a tool to check server headers, you can see your server reponds with

Content-Type: text/html; charset=ISO-8859-1
Content-Language: pt-BR

Scirra.com responds with:

Content-Type: text/html; charset=utf-8

Your server should really be using UTF-8 since it's the only way to ensure that text is displayed properly for everyone regardless of their language. If you don't know how to do it get in touch with whoever runs your server. Another workaround which isn't as good is to simply convert your index.html file to the ISO-8859-1 character set (a program like Notepad++ is good for this), but it will keep happening with files Construct 2 exports until you fix the server.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Nov 07, 2011 4:26 pm

Thanks Ashley,

I will send your report to the webmaster of my client.
B
90
S
5
G
8
Posts: 164
Reputation: 7,646


Return to Construct 2 General

Who is online

Users browsing this forum: 99Instances2Go, blackhornet, shinichild, TRMG and 18 guests