15

I just built a site that relies on certain Unicode characters like Ⓐ, but why doesn't Internet Explorer show these characters?

Is there some meta tag to get the browser to show it or how do you update Internet Explorer to handle these Unicode characters?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user365071
  • 153
  • 1
  • 1
  • 4
  • 1
    Explain more. What ASCII characters does your site "rely on"? IE will show you all the (visible) ASCII characters, and if you're trying to display control characters visibly, well, you're probably Doing It Wrong. – Thanatos Jun 12 '10 at 04:11
  • Which characters, specifically? This determines what encoding needs to be used... – Artelius Jun 12 '10 at 04:12
  • Ⓐ and many more.. it's a service where people can use all the cool ascii characters.. its works perfect for safari and FF – user365071 Jun 12 '10 at 04:13
  • is it something with this – user365071 Jun 12 '10 at 04:14
  • @findmeahamper: You should only specify *one* Content-Type, and only *one* encoding. (Your document can not be encoded in multiple character sets.) Given that you specified Ⓐ - Is that supposed to be a "Ⓐ"? (Circled A) - if so, then you're trying to use Unicode. – Thanatos Jun 12 '10 at 04:24
  • @findmeahamper: Ⓐ is not ASCII - it's UNICODE. – John Saunders Jun 12 '10 at 05:00
  • ok this is weird.. why does little a with circle work in IE? ⓐ – user365071 Jun 12 '10 at 06:54

3 Answers3

30

Okay... here's the solution to your problem. You need to specify a Unicode font. E.g.

<p style="font-family: Arial Unicode MS;">&#9398;</p>

You've got to love IE... it will keep us all in business... forever.

Gert Grenander
  • 16,866
  • 6
  • 40
  • 43
  • He still needs his document in the right character set, or the entity reference isn't going to work. – Thanatos Jun 12 '10 at 04:41
  • It wouldn't hurt, but it worked without it when I tested it. Probably because you're referencing it as the code and not as it's character. – Gert Grenander Jun 12 '10 at 04:48
  • that seems to work.. but since i as the characters need to work on facebook.. i can control their style.. little 'a' with circle works in IE without and unicode.. ⓐ i think ie8 and ie7 handle these characters differently as well.. it onlye works when it goes to compatibility mode in ie8.. – user365071 Jun 12 '10 at 07:16
  • Windows XP doesn't come with Arial Unicode MS, see Ryan's answer. – nwellnhof Oct 25 '13 at 10:29
7

This page helped me figure out which fonts would display correctly for me:

http://www.fileformat.info/info/unicode/font/fontlist.htm?text=%E2%96%B6+-+Unicode+Character+%27BLACK+RIGHT-POINTING+TRIANGLE%27+%28U%2B25B6%29

Arial Unicode MS didn't seem available to me in Win XP IE8 on a VMWare virtual machine, but Lucida Sans Unicode appeared to work.

Then I wrote this SCSS mixin:

@mixin unicodeFont(){
    font-family: Lucida Sans Unicode, Arial Unicode MS, Arial;
}
Ryan
  • 22,332
  • 31
  • 176
  • 357
7

There are only 128 ASCII characters. You're probably talking about Unicode. Please read The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!).

Whether IE will play nice is another matter. Under the View->Encodings menu you can override the character encoding setting for a web page.

Artelius
  • 48,337
  • 13
  • 89
  • 105
  • Thanks Guys.. There service is for facebook don't think it's going to work, have to pull the plug.. bloody IE! – user365071 Jun 12 '10 at 04:21
  • 1
    It's achievable - some websites do it. Don't give IE any reason to go into quirks mode. Also you may need to send the right HTTP headers. – Artelius Jun 12 '10 at 04:25