Displaying Chinese characters in HTML AND form controls

I have a weird problem that I can't seem to get around.  I have a simple HTML page that needs to display characters (let's say I want it to display any character from any language for the sake of argument).  This page works great for all Western fonts, but falls down a bit with the Asian character sets.  Specifically, characters are properly drawn when within <p> tags, or other plainly displayed tags.  However, when the characters are in a form control (like a drop down), they show up as little blocks.

I notice the meta I use has the content-language set to "en-us", so that seems pretty limiting.  But, shouldn't I be able to set content to something more flexible?

Could someone show me the proper configuration to make a page flexible enough to display any character of any alphabet on an HTML page?

In this code snipped, the text between the <p> tags would generate properly - regardless of character set.  The text within the <option> tag is rendered as boxes when I try pasting chinese characters.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Character Test</title>
</head>
 
<body>
      <p>Some random text here - with any character set</p>
      <select>
          <option value="native language text">Native Language Text</option>
      </select>
</body>

Open in new window

LVL 16
Steve KrileAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Koma666Commented:
UTF-8 should work for any characters, perhaps the caracters you insert are in the wong encoding.
ISo CN or GBK or something.

Be sure that the caracters you paste are real chinese utf-8

this should be an utf-8 char: ¶
0
Koma666Commented:
Seems like experts exchange doesn't show the caracter right.
0
Steve KrileAuthor Commented:
That's the weird part.  The characters are both in the HTML and the Select options.  They are identical...taken from the same place.  In the <p> it's OK, in the <option> it's not.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Koma666Commented:
I tested your code with some chinese caracters and for me it works fine in firefox but not in IE, perhaps it's a browser thing.

0
Steve KrileAuthor Commented:
Lord.  Well, ain't that just grand  :)
0
Koma666Commented:
Lol, I found the trick.

add a style to the option.

font-family: Arial Unicode MS;

Then it shows correctly.

The default font style doesn not have chinese characters ;-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Steve KrileAuthor Commented:
OK, so...seriously...NICE!  That's it.  My intellisense doesn't know what Unicode MS is, but my browser does.  Works perfectly.  I have Century Gothic set as my default <body> font.  Well, apparently, there are no Unicode characters in that font set.  So, for Inputs and Selects, I set my font-family just as you show above, and voila....all is right in the universe....for now.

Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.