views:

63

answers:

3

The URLs exhibiting this behavior is here:

http://culturewithinaculture.org/introduction.php
http://culturewithinaculture.org/about.php
user: cwac
pass: cwac2112

The site has not been launched officially. But my problem is on the right side, Japanese copy. I have my document type set to UTF-8 which is what I thought it should be. On Firefox, and Safari I have no problems at all...shows up fine. In IE 8 however it is square boxes and illegal characters. The funny thing is that if you click on the 'compatibility mode' button it refreshes the page and all is fine. However, that has had mixed results too, a friend of mine tried it on their XP machine with IE 8 and the compatibility mode did not work (still had square boxes for unrecognized characters).

I want this to be cross browser capable, and I don't want to force an IE person to click on a 'compatibility mode' button or anything like that. I know I could just make the Japanese copy a large image, but I'd like to have the text selectable and HTML if possible.

Have any of you experienced this issue? Is there some special IE only CSS or jQuery magic I can use to force proper text display? Perhaps a font-face trick?

All help is greatly appreciated!

+1  A: 

Here are your response headers:

Date: Thu, 08 Jul 2010 22:52:12 GMT
Server: Apache/2.0.54
X-Powered-By: PHP/4.4.8
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 5319
Keep-Alive: timeout=5, max=88
Connection: Keep-Alive
Content-Type: text/html

Note that the Content-Type header is missing the charset attribute and the webbrowser is thus forced to use platform default encoding which is often ISO-8859-1. FireFox is actually smart enough to autodetect the correct encoding and apply it instead (you can check it by View > Character Encoding).

Since those pages seem to be PHP generated, best what you can do is to add the following to the top of your PHP pages (or header-include, if any), before any character is been emitted to the response body:

header('Content-Type: text/html; charset=UTF-8');

See also:

BalusC
Is there something I'm missing? I have this in place right now:<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />Are you talking about defining it in another place?
ESB
I apologize for my PHP and content-type newbie-ness, but I tried everything you mentioned here and I still have no luck. I added the following PHP code to the top of my introduction.php file.<?php header('Content-Type: text/html; charset=UTF-8');?>I also have the following meta-tag in place.<meta http-equiv="Content-type" value="text/html; charset=UTF-8" />I truly don't understand what the issue is. I read about response headers too, and you are right...it's defaulting to only text/html. Any other suggestions?
ESB
UPDATE: Now the response headers are correct and when I check them they say it is using charset=UTF-8, but IE 8 STILL refuses to display it correctly unless I use the compatibility mode. I truly do not know what's going on. Any other suggestions?
ESB
The response header is still `text/html`. The meta header (as in HTML source) is however correct, but webbrowsers are more relying on the response headers. Did you add `header()` to the PHP file as described above?
BalusC
A: 

Your meta tag is as follows.

Another site's one

Of course, any browser should handle both correctly. But please try it.

kmugitani
I see nothing man. Did you mean to include some code?
ESB
Sorry. I wrote meta tag.But this site did not like raw meta tag description.Anyway, your meta tag description has no problem. Only remaining my suggestion is Adding Lang="ja" in your html tag.
kmugitani
A: 

Well after a ton of reading, and testing, the ONLY way I have been able to get this to work is by adding the following code.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

To my knowledge this forces IE 8 to use compatibility mode. It works for both links I included above. I'd love to know of a way to correct this without forcing this 'mode', but for now it works and I'm happy with it.

Thanks for all the suggestions.

ESB