Re: (Re: Unicode mapping table need help) Euro sign encoding

From: Peter_Constable@sil.org
Date: Thu Jun 10 1999 - 07:37:57 EDT


>Does it actually work? When you use the "A" functions (e.g. ExtTextOutA), does
Windows convert from CP1252 to Unicode before accessing the font? What does the
old (euro-less) CP1252 -> Unicode converter do with 0x80? Does it change it to
0x0080?

Yes, it works. The "A" functions must convert from cp1252 to Unicode before
accessing the font because Windows TrueType fonts have only ever used Unicode.

Old cp1252 mapped 0x80 to 0x0080. I thought I had mentioned that.

>Even if it does work, I don't think it's a clean solution. Assigning the euro
glyph to U+0080 violates the spirit of the Unicode standard, if not the letter.

I already admitted that.

>Or, as someone else so succinctly put it, "Yuck".

It sure is a lot better than changing 0x87 and 0xA4 to the euro, which violates
both cp1252 and Unicode, and is a much worse violation of Unicode as it affects
two characters that do get used. The alternative suggestion I was responding to
has obvious and undesired side effects. This deserves at least a small "yuck".

My suggestion does not violate cp1252, it only affects a Unicode codepoint that
is never otherwise used inside a font, and the change does not affect anything
outside the font. It has *no* bad side effects. The only user that would even
realise that anything has changed is the one who understands Windows
machinations with codepages and fonts well enough to recognise that something
actually *worked* with the font when they expected it to be broken, e.g. they
can get the euro glyph using 0x80 on Win95 even without the eurofix patch
installed. I don't think there's anything "yucky" about that.

Peter



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:46 EDT