On Wed, 25 Mar 2009 23:35:41 -0700
"Kevin O'Gorman" <kogor...@gmail.com> wrote:

> > After a bit of Googling, it seems the accepted solution is to use
> > HTML entities for those symbols and not try to use the raw
> > characters as you are attempting to do.
> >
> > http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
> >
> > Does that contain all of the symbols you need? If there are any
> > others, you should be able to use the unicode versions.  
> 
> Sigh.  My stuff is not for a mass audience.  I can expect them to
> install a font,
> and I'd really not like to be fooling with entities that much --
> composition is laborious.  It's really annoying to me to have a font
> on my own system that is inacessable through browser features that
> were apparently designed to allow just that.
> 
> And Unicode is a complete mystery to me.  I see stuff come in and
> display as it should, but as an author it's just something I've never
> used.  How do you compose such stuff on a standard US-English
> keyboard and system?
> 
> I'll do what I have to do, but only when I'm convinced it's the best
> alternative.

An easier alternative (IMO) would be to serve the pages with
charset="UTF-8" and compose them as Unicode pages.  This way you can
just use the raw UTF-8 characters without having to look up entity
names.  Example: <http://remarqs.net/misc/pi.htm>.  To do it that way,
you'll need to edit the pages with a UTF-8-capable editor and save
them with that encoding, natch.

The issue you were up against, trying to use a font specification to
change one character into another one, just won't work with html.  When
a browser encounters a character, it should first check to see if it
can use the specified font(s) to render it;  if it can't be rendered
using the specified font(s), the browser must look for a font that
contains a glyph for the character and use that font instead.

In the case where the the specified font is Symbol, there's no glyph
for a 'p' in that font, so the browser must use some other font
whenever it encounters a 'p'.  What it must *not* do is change a 'p' to
a 'π'.

IE has always been broken in this way, and the old Netscape browsers
were as well.  At the start of the Mozilla project, they did away with
this bug.  IIRC, before Firefox 3, there was a hackaround to
re-introduce the bug by editing some Firefox files, but it's no
longer possible to trick Firefox into substituting one character for
another.  (I don't believe WebKit/KHTML browsers or Opera can be tricked
into it either, but I'm not sure.)

-- 
»Q«
     Kleeneness is next to Gödelness.


Reply via email to