Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jan 2002 19:39:48 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: apropos Euro
Message-ID:  <200201011839.g01Idms11857@lurza.secnetix.de>
In-Reply-To: <200201011627.g01GR4v08652@meta.lo-res.org>

next in thread | previous in thread | raw e-mail | index | archive | help
aaron <aaron@lo-res.org> wrote:
 > Yesterday after a very nice new years eve party, I was wondering
 > if the Euro Symbol (character code 164 on iso-8859-15) was supported.

It is.

 > Not that it would make much difference. I guess I any everyone else will be 
 > perfectly all right to just spell out "EURO"

It does make a difference.  I've already seen quite a lot
of webpages and emails containing the Euro symbol.  After
all, Windows already supports it for quite some time, so
people are using it.

 > So far, I was able to display the Euro symbol but could not find a way to 
 > convince the console, KDE, emacs or vi to accept it on the keyboard (ALT-Gr E 
 > over here).
 > Any ideas?

Someone else already answered the question for X11/XFree.
The following will work for the console (i.e. syscons):

First be sure to set up an appropriate ISO8859-15 font in
your /etc/rc.conf.  To see which fonts are available, see
the /usr/share/syscons/fonts directory.  You probably want
the iso15-8x{9,14,16} ones.  You can use vidcontrol (see
its manpage) to change the font immediately.

To verify that you really have the right font, you can use
the following awk command at the shell prompt:

   awk 'BEGIN{for(i=160;i<180;i++)printf"%3d %c\n",i,i}'

You should see the Euro symbol at position 164.

Next you should set up your keyboard mappings, so you can
enter the symbol.  For example, on many European keyboards
(such as German ones), AltGr-E is used to enter the Euro
symbol, but you can setup any other key combination that
you're comfortable with.

Have a look at the /usr/share/syscons/keymaps directory.
Some of the keymaps already contain the mapping of Alt-E
(or AltGr-E) to character 164, but some don't.  However,
it's easy to add to your keymap file if it's missing.
Use the kbdcontrol tool to load your new keymap file
(see the manpage for details).

When you create webpages containing the Euro symbol, be
sure to correctly declare the character set!  The default
for HTML is ISO8859-1, so the Euro symbol would not display
correctly if you forget to declare the page to be 8859-15.
The following line inside the <head> section of your pages
will do it:

   <meta http-equiv="Content-Type"
   content="text/html; charset=ISO-8859-15">

On a related note, when you send e-mails or news postings
containing the Euro symbol, be sure to configure your
client so that it inserts the correct MIME headers for the
ISO8859-15 character set.  At the very least, the following
two header lines are necessary:

   Mime-Version: 1.0
   Content-Type: text/plain; charset=iso-8859-15

The details depend on your client software, so please
refer to its documentation.

Finally, many programs should respect the locale settings
of your environment.  The environment variable LC_CTYPE
is responsible for declaring your character set to
programs and applications that are l10n/i18n compliant.
You can see all locales in the /usr/share/locale
directory.  For example, put the following in your
shell's startup script if you use some kind of bourne
shell (sh, ksh, zsh, bash):

   export LC_CTYPE=en_US.DIS_8859-15

For csh or tcsh, use this one:

   setenv LC_CTYPE en_US.DIS_8859-15

Note that the locale name was changed recently from DIS to
ISO.  Look at the /usr/share/locale directory for the
right name.

Regards
   Oliver

PS:  ISO8859-15 is sometimes referred to as "Latin-9".
The numbering is a bit confusing, because not every ISO
character set has a corresponding "Latin" number.

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201011839.g01Idms11857>