Search code examples
htmlinternet-explorerunicodehtml-select

IE: Unicode characters in HTML select and option tags


I need show options in a select with unicode characters. Try this:

<select id="ddlNota_CateId">
<option value="1091">&#26641;&#31435;&#20351;&#29992;ICT&#30340;</option>
</select>

And show unrecognized charcaters (树立使用ICT的). :s

Example in http://200.115.217.50/test.html


Solution

  • For IE you'll need to explicitly set fonts in your CSS that have those characters. Unfortunately it's impossible to know which fonts your visitors have, so you'll need to add a list of popular ones. For example:

    body {
       font-family: Arial Unicode MS, Lucida Sans Unicode, Code2000, sans-serif; //etc.
    }