It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

IE, UTF-8 and select tags

IE, UTF-8 and select tags

Postby continuities on Thu Sep 23, 2010 5:09 pm

Hey folks,

Here's a weird one for you:
Code: Select all
A:
<select>
  <option>廖</option>
</select>
B:
<span>廖</span>


In Firefox, both the characters at A and B will display correctly.
In Internet Explorer (tested in 7 and 8 ), B will display correctly while A displays as a box "WTF-is-this-character" character.

Any ideas on how to force IE to render UTF-8 characters correctly inside a <select> tag?

Thanks!

- Michael
continuities
 
Posts: 2
Joined: Thu Sep 23, 2010 5:07 pm

Re: IE, UTF-8 and select tags

Postby continuities on Thu Sep 23, 2010 7:17 pm

In case anyone is interested, I have solved it.

Turns out that IE only half-supports Chinese characters unless you specifically install support for East Asian languages into Windows. Apparently it takes a different font to render characters within <select> elements than it does to simply render them to the body. Those special fonts are not installed in Windows by default. Go figure.
continuities
 
Posts: 2
Joined: Thu Sep 23, 2010 5:07 pm

Re: IE, UTF-8 and select tags

Postby HotNoob on Thu Sep 23, 2010 8:34 pm

if its a language package thing, than the chances are that who ever you are targeting is going to have that language package.
---
however, you might want to look at this page:
http://www.chinesecomputing.com/internet/web.html
it talks about using this:
Code: Select all
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=charset_name">


to help display the Chinese characters
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am


Who is online

Users browsing this forum: No registered users and 7 guests