IE: Unicode characters in HTML tags and option tags

I need show options in select with unicode characters. Try the following:

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

And show unrecognized characters (ζ ‘η«‹ 使用 ICT ηš„) .: S

Example at http://200.115.217.50/test.html

+4
source share
5 answers

For IE, you need to explicitly specify fonts in CSS that have these characters. Unfortunately, it is impossible to find out which fonts you have, so you need to add a list of popular ones. For instance:

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

A numeric symbolic link in HTML always uses Unicode characters. For example, the first character # 26641 refers to U + 2611 , which is the Chinese character ζ ‘.

The characters you put in the question look right. This is almost certainly a problem with the browser, font, or operating system. For example, if you see squares instead of characters, the browser does not have a suitable font. Some browsers automatically select the font that you need, but you may need to explicitly specify the font family in others.

Try Help: multilingualism support (East Asia) on Wikipedia.

+3
source

Make sure you have the Content-Type: text/html; charset=utf-8 header Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=utf-8 and / or <meta charset="utf-8"> if you directly enter japanese / chinese / unicode characters in (not html entities).

This works: http://jsfiddle.net/nP87F/1/

HTML objects should work independently . Are you sure that not only your text editor or OS does not support this language?

If you use Windows, this may be useful:

+2
source

Remove the font setting in the style declaration. You tell the browser to use a special font that clearly does not support the characters you need.

0
source

Two problems that I see:

  • The font name should be β€œArial Unicode MS”, exactly the same, or the exact name of another suitable font.
  • Your web server (IIS) does not serve as UTF-8 for this. I get the following:

    $ curl --head http://200.115.217.50/test.html
    HTTP / 1.1 200 OK
    Content Length: 874
    Content-Type: text / html
    Last modified: Wed, Aug 11 2010 15:56:14 GMT
    Accept-Ranges: Byte
    ETag: "6ae315ba6d39cb1: 1d22"
    Server: Microsoft-IIS / 6.0
    X-Powered-By: ASP.NET
    Date: Wed, 11 Aug 2010 16:11:48 GMT

    It should be Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8

ALSO, next time, clearly indicate your code and URL in the main question for everyone to see - you send people to wild games with guessing otherwise.

0
source

All Articles