Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: bill
We would like to store as UTF-8 and display as GB2312 - but without the funny chars.
If you use a proper DTD, language and charset declaration meta tags your users should have no difficulty seeing UTF-8 pages at all. What do your headers look like? Could you post a snippet?
Here's how I do one of my Chinese sites:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh" />
Note the language declaration in the HTML tag. That helps the most.
Hi - but are Chinese users that only have gb2312 browser encoding able to see the site properly?
The site's been tested with IE5, IE6, IE7, Opera, Firefox, and Safari. I've tested it with Traditional and Simplified Chinese operating systems (Windows & Mac) as well as Japanese and English. The site has never failed to show up in that range of software and operating systems.
This isn't a question of looking at example sites, but rather standard code and possibly your server setup. As you say in your first post, your data is in UTF-8 already. You're probably using PHP too, correct? Do you have mbstring setup properly?
Again, a snippet from your code might help our understanding of your issue. Another thing you might want to try is to check whether your HTML is valid with a validator [validator.w3.org].