Forum Moderators: open

Message Too Old, No Replies

Using Unicode 8 characters: how to?

How do I insert character 21B4?

         

JAB Creations

9:46 pm on Feb 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want to use UTF-8 character 21B4 however I'm actually not sure how to insert it.

- John

Robin_reala

9:49 pm on Feb 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can’t you just copy+paste it into your document? If you’re saving your document as a Unicode encoding (UTF-8,16,32) and serving it as the same then that ‘Should Just Work’TM.

JAB Creations

9:55 pm on Feb 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can only find it on a PDF (I hate PDFs) and it won't allow me to copy the character. I'm not sure how to create UTF-8 characters so that is why I'm (still) asking. Thanks for your quick reply.

- John

dcheney

10:34 pm on Feb 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are using a modern version of windows use the "CharMap" utility.

penders

12:15 pm on Feb 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you use the numeric (hex) character entity in your HTML document...?

↴

...then you wouldn't need to save or serve your document as UTF-8? (Is that right?!)

Although this displays OK ("righwards arrow with corner downwards") for me in FF and Op, IE6 baulks and just displays a square block ...?

JAB Creations

3:28 pm on Feb 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So much resistance to a simple question.

Penders...

↴

...thank you.

Additional information: I haven't even converted the file to UTF-8 yet (ANSI) but this works fine. IE displays a block, great, another reason to contrast and then move my visitors to competent browsers.

I used Character Map but I will not limit myself to what Microsoft deems worthwhile to support.

- John

Robin_reala

3:52 pm on Feb 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I believe this is because a misinterpretation of the standards by IE. We all know that font-family provides a list of possible fonts to use. Most people though don't realise that this works on a character level as well as a generic 'have you got the font?' level. So for example, if you specify:

p { font-family: MyFont, MyBiggerFont; }

then if any character from <p> isn't in MyFont then it should drop down to MyBiggerFont and use that font for that character only. I don't believe IE implements this, which is why you need a Unicode complete font (or as close as possible) as your main font.

penders

5:41 pm on Feb 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...I don't believe IE implements this, which is why you need a Unicode complete font...

Mmm, yes, this seems to be the case! So... you can get IE6 to display the correct character if you explicitly tell it to use a unicode font:

CSS:

.unicode { 
font-family:"Lucida Sans Unicode",sans-serif;
}

HTML:

<p>Blah blah <span class="unicode">&#x21b4;</span> blah blah...</p>

...and this works OK in FF, Op and IE6 on my Windows machine (how standard is 'Lucida Sans Unicode'?) This maybe OK for the odd character, but could quickly become a chore if many - but then you'd be using UTF-8 throughout I guess?

Robin_reala

9:36 pm on Feb 25, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If it was that important I’d use Lucida Sans Unicode or Arial Unicode MS as my main font instead of adding extra markup. They’re both pretty widespread.

If it was critical that the character was shown then I’d use an image.