On 2013-01-08, JJ <jaej...@nah.meh> wrote:
> Whiskers <
catwh...@operamail.com> wrote:
>> <
http://www.alanwood.net/demos/symbol.html>
>>
>> [...]
>>
>> Specifying Symbol font is contrary to the published
>> specifications, has never been a documented feature of HTML, is
>> not reliable, and should not be done.
>>
>> [...]
>>
>> Whoever coded the page managed to get it right by specifying UTF-8
>> and sensible fonts globally, but then for some reason coded the Greek
>> characters like this to over-ride the font, but not the character set
>>
>> <span style="font-family: Symbol;">Z,z</span>
>>
>> despite getting the Hebrew characters right, like this
>>
>> <span style="font-size: large;">ז</span>
>
> Something is not right though... In that alanwood page, in the Letterlike
> Symbols table, the first four unicode characters are not showing. They
> only be shown if I change the font setting to other font that have those
> characters (e.g.: "Arial Unicode MS" or "Code 2000").
Nothing strange about a font that hasn't got a particular character in it,
not being able to display that character.
> The default font
> "Times New Roman" doesn't have those characters. Another strange thing is
> that, if the HTML choose "Symbol" font for those characters, the
> characters are displayed correctly even though the font setting is set to
> "Times New Roman".
The HTML on that page over-rides the 'global' font by specifying the font
called "Symbol" (but retains the charset UTF-8) for the places where it
wants a Greek letter to appear. If your browser happens to have a font
available named "Symbol" which has Greek letters in the position where the
UTF-8 charset has Latin letters, and the browser also reacts to the
non-standard coding in the way the coder of the web page hoped, then you'll
see the Greek letters from the "Symbol" font; otherwise, you'll see the
Latin letters from the page's global font.
> See the Alef symbol character example below or via:
>
http://jsfiddle.net/8MQRg/
>
> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
> <style>
> .sym{font-family:Symbol}
> </style>
> </head>
> <body>
> Default font:<br />
> Direct (UTF-8) = ℵ<br />
> HTML Code = ℵ<br />
> HTML Entity = ℵ<br />
> <br />
> Symbol font:<br />
> Direct (UTF-8) = <span class=sym>ℵ</span><br />
> HTML Code = <span class=sym>ℵ</span><br />
> HTML Entity = <span class=sym>ℵ</span><br />
> </body>
> </html>
As the original web page doesn't contain the correct coding for any Greek
letters, I think you'll need some sort of look-up table to convert the
non-standard character codes in the "Symbol" font into the standard UTF-8
character codes for the matching Greek letters.
A quick and dirty fix is to substitute the correct Greek letters for the
spurious Latin letters in the original HTML, perhaps with the help of a
character selection tool. For example, changing
<span style="font-family: Symbol;">G,g</span>
into
<span style="font-family: Symbol;">Γ,γ</span>
or better
<span>Γ,γ</span>
corrects the page for me (Opera having a UTF-8 font to use, of course; I
have the DejaVu fonts specified for the 'Font family' settings).
I simply right-clicked on one of the spurious Latin letters in the "Greek
Letter" column, selected "Inspect element" in the menu that appeared, then
edited the faulty line in the page's code.
You don't need to worry about the Hebrew letters, as they are already
properly specified in the web page. Your browser will of course need a
UTF-8 font that has the Hebrew letters.
Then you could use the "Contact" email address (see link at foot of page)
to tell the webmaster how to re-code the page to remove all reference to
the "Symbol" font (and any of the 200-odd other errors you feel like
addressing).