Forum Moderators: open
Here's the DTD headers:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
What I'm attempting to do is have a form list for selecting the language with English with the Chinesem translation in parenthesis next to it and if you select the Chinese site, have the Chinese text with the English translation in parenthesis beside it. Is this possible?
What I do is declare the content type as UTF-8, but then encode all non-7-bit characters as entity codes so they are actually sent down the wire as 7-bit, eg:
中国, 中华
The effect of the UTF-declaration is then only used to tell the browser how to handle the >7-bit characters AFTER they have been decoded, but is not actually used to encode the text on-the-wire.
Rgds
Damon
PS. Also make sure that you set the content-type in the real HTTP header, not the meta-header in the body, since that may be too late and the browser may have already committed to a particular decoding before it sees the meta headers.
[edited by: DamonHD at 9:19 am (utc) on Sep. 6, 2007]