[ILUG] tip of the day...getting a euro working in X
John Gaughan
jgaughan at irish-times.com
Tue Jul 11 17:40:43 IST 2000
On Tue, 11 Jul 2000, Kenn Humborg wrote:
> > First, get a euro-aware font. According to the ever-helpful Caolan, this
> > should do the biz:
> >
> > % xlsfonts |grep iso8859-15
> >
> > Next, setup xmodmap, to map the euro to altgr-4:
> >
> > % xmodmap -e 'keycode 13 = 4 dollar currency onequarter'
> >
> > And, voila: ¤ to your hearts' content.
>
> Well, on my Euro-compliant NT 4 machine with a Courier New
> font that has the Euro char (which is , ANSI 128), your Euro shows
> up as the "Universal Currency Symbol", which is ANSI code 164.
>
> So, what's the _real_ story here? It's probably that Windows
> has screwed up fonts, but I'd love a definitive answer...
It's due to different codepages, Microsoft use their own codepages which
are mostly different to the ISO codepages. When Microsoft added support
for the Euro to their codepages, they just slotted the new character into
an unused position in their codepages. The Microsoft codepages use a
portion of the codepage (character 128 to 159) which is unused in the ISO
codepages to include extra characters. In the case of their cp1252
(WinLatin1, it's a superset of iso8859-1) codepage the Euro was added at
128 in the codepage.
The ISO method was to create a new codepage (iso8859-15) based on iso8859-1
which replaced the currency symbol (164) with the Euro. The new codepage
also replaced some of the other less used characters.
You can see the differences in the codepages by looking at the tables on
these webpages:
For the iso codepages:
http://czyborra.com/charsets/iso8859.html
For MS and some other proprietry codings:
http://czyborra.com/charsets/codepages.html
John.
More information about the ILUG
mailing list