Forum Moderators: phranque
However I have a problem with my local host Apache server. Opera detects the different charsets and displays both page types automatically. However Mozilla and IE do not detect the GB2312 charset, and always defaults to Western European.
I assume there is something that needs tweaking in httpd.conf for GB2312, but I can't see what it could be. My page header is:
<?xml version="1.0" encoding="GB2312"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
<head>
<meta http-equiv="Content-Language" content="zh">
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
Any help appreciated.
Harry
If you've already used the AddCharSet and/or AddDefaultCharSet directives, then I don't know what the problem might be.
I tried a search [google.com] on that charset, and it seems that there is quite a bit of discussion about it. That may be a good place to start.
Jim
The header I gave before had a typo in the meta tag. Correct one below:
<meta http-equiv="Content-Language" content="zh" />
All my pages are .php although I can't see how that would make a difference. I have double checked what is happening and my GB2312 pages on my hosting company's server render automatically in all browsers. But the identical pages on my local host server only render automatically with Opera. From a bit of experimenting, it seems Opera sets the encoding from the meta tag, but the other browsers seem to be expecting something more.
My config file includes:
DefaultType text/plain
AddCharset GB2312 .gb2312 .gb
LanguagePriority en zh da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
ForceLanguagePriority Prefer Fallback
AddDefaultCharset ISO-8859-1
send-as-is is commented out, but uncommenting it made no difference.
#AddHandler send-as-is asis
I added AddLanguage zh, but it made no difference.
AddLanguage zh .zh
I suspect it will be something very simple to somebody who understnds Apache - unfortunately I don't. Any suggestions welcome.
Harry