Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: phranque
However when I go to that page all I can see is Chinese Symbols... and it seems to be showing the source code.
Check out my site to see what I mean...
I'm not advertising - just thought it might be easier if you see what I'm talking about. I've only put the words 'coming soon' on this page to test.
What have I done wrong?!
[edited by: trillianjedi at 10:25 am (utc) on May 17, 2006]
[edit reason] TOS [/edit]
The site url returns a directory list. To avoid this, you need a file with a name such as index.html, but other names are acceptable depending on server configuration.
Content-Type:text/html (BOM UTF-16, litte-endian)
You might want to be using UTF-8 as a character encoding, but I've no idea what BOM UTF-16 is.
Seeing as your server is based in the United States (according to IP address geolocation), I've no idea why it would be sending such an odd Content-Type header.
Check what character encoding you're using in your HTML editor. If it doesn't look like that's to blame, then ask your server admin why the web server is specifying such an odd encoding.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Put that just after the <head> statement and before the <title>
Note the semicolon you are missing. Just cut and paste from this posting.
I don't know where you got that other content type, I would remove it as a test. -Larry
I tried putting in that code but after asking my host why it isn't showing up they replaced it with:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
His reponse was:
The problem is in the headers of your page, you are encoding the page as UTF-8, most of the
UTF-8 characters are Chinese.
I have changed the encoding of the page to iso-8859-1 it now functions correctly.
Which works - however I've tried it on other pages and they are still showing Chinese symbols - is this simply a problem with my host. I'm on a 14 day trial and am not impressed so far. Would you consider trying someone else?
You need to save the files UTF-8 without BOM and to do this you need an editor that gives that option.
Several editors are listed on Alan Wood’s Unicode Resources - Multilingual Editors [alanwood.net]. I'd recommend EmEditor having used it..
Some editors save as "UTF"=UTF-16 and not UTF-8. Wordpad on Windows 98 is one that does that.
I expect then data within the file is read as 16byte characters many of which are Chinese.
Alternatively, if you're not using characters outside iso-8859-1 you could simply save all your files as ASCII or iso-8859-1.