old-www/LDP/LG/issue77/tag/3.html

425 lines
16 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.o">
<TITLE>The Answer Gang 77: The euro symbol</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="../index.html"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Gang</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and...
(<a href="tag/bios.html">meet the Gang</a>) ...
the Editors of Linux Gazette...
and You!
<br>Send questions (or interesting answers) to
The Answer Gang
for possible publication
(but read the <a href="../tag/ask-the-gang.html">guidelines</a> first)
</H4>
</center>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><hr><p>
<!-- begin 3 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>The euro symbol</H3>
<p><strong>From Mark McGrath
</strong></p>
<p align="right"><strong>Answered By Jay R Ashworth, Mike "Iron" Orr, Yann Vernier, Ben Okopnik, Andreas Daab
</strong></p>
<P><STRONG>
Here's an interesting question that I thought you
might take a look at. IT applies more to the Europeans
among us but then maybe the wider community might
benefit if it were broadened to the wider question of
dealing with different fonts!
</STRONG></P>
<P><STRONG>
How is it possible to view the euro symbol on programs
running on linux machines, programs like netscape,
emacs, mutt, etc., etc.,
</STRONG></P>
<P><STRONG>
Thanks in advance.
</STRONG></P>
<P><STRONG>
Sl&aacute;n,
</STRONG></P>
<P><STRONG>
Mark.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
I quoted all of that for a reason.
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
This is a good one, and one that's cropping up on several of the mail
lists in which I participate, as well. It's a multi-faceted problem.
</blockQuote>
<blockQuote>
Using non-ASCII characters (I was going to say "on a PC", but that's
sort of obvious) requires several things:
</blockQuote>
<UL>
<li> A way to type them in.
<li> A way to ensure that the OS you're using knows which character set
they're in. (A character set is a mapping of bytes to glpyhs, a glyph
being a picture of a character in a font. You can have many fonts in
the same character set.)
<li> The program has to be equipped to handle incoming characters in
arbitrary character sets, and either to retrieve the mapping
information from the OS, or be told it itself.
<li> If the program interacts with other programs, there has to be a
standardized way of tagging which information is in which character
sets.
<br>
and finally
<br>
<li> A way to get them back out on the screen so you can read them.
<br>
</UL><blockQuote>
Each of these is handled, in Linux, by different things, and you need
to make sure that all the pieces are in place. Frankly, I wouldn't be
surprised at all to see an amendement to X3.64, the ASCII standard
(which I think is also ISO 10646), to include the Euro character.
</blockQuote>
<blockQuote>
Actually, I'm surprised it's not there already.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Iron]
There aren't any empty slots in ASCII. You'd have to replace something like
the backslash or the pipe symbol, and that would wreak havoc on situations
that don't expect these glyphs to change, like ASCII art, shell scripts and
Windows pathnames.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Well, no, I think you could find some other character to replace. I
should clarify that I really don't mean USASCII (the 7 bit character
set), what I really mean is "the most common 8-bit extended version of
ASCII" -- though admittedly I don't know what that is. ISO-8859-0?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Yann]
-1, for western europe. -2 is eastern europe. Euro variants are -15 and
-16 respectively, I think. The replaced character is €, which is an
ancient sun symbol that also means "currency". It has the high bit set.
Swedish people got lucky in that some odd person decided to put that
character on our keyboards long ago - it's at Shift+4, with $ at
AltGr+4. However, this also means that our keys are now marked with both
"sol" (sun in swedish) and "Euro" (AltGr+E), but in different positions,
and either one may or may not work.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Iron]
Although I think character 35 (# or number sign) shows up as L (pound sterling)
on British screens and other currency symbols in other places, no?
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Yeah, it tends to...
</blockQuote>
<blockQuote>
An answer to this question of the Euro has, probably not all that
surprisingly, been written already; it's the Euro Character Support
miniHOWTO:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/Euro-Char-Support"
>http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/Euro-Char-Support</A>
</BLOCKQuote></blockQuote>
<blockQuote>
...but it's sort of weak, and may be specific to Finnish.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Iron]
As it says, new charsets have been added to the LATIN-x series containing
the euro symbol. Are these high-bit characters? If so, they'll have the
usual problem with non-ASCII characters: they show up differently depending
on which charset is loaded on the recipient's computer, and whether the program/
console can switch charsets according to the document or portion of the
document.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Yeah. But there's a pretty standard default 8-bit set these days,
isn't there? Even if it's just "IBM Code Page 437/850".
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Yann]
Code pages 437 and 850 are incompatible, which annoyed people here no
end as letters in our alphabet are different in the two. The "pretty
standard" set is Latin 1, or ISO 8859-1, which happens to coincide with
codepage 850 quite a lot.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
There doesn't actaully seem to be a general HOWTO on using non-ASCII
character sets with Unix that I can find at the moment [spots
opportunity
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">], but some of the specific ones inlclude those for
Belarussian, Danish, Hebrew, and the Unicode one -- which is probably
where we should all be headed anyway... though the idea of security
holes in the <EM>character set</EM> worries me a touch...
</blockQuote>
<blockQuote>
Hope this helps at least a little bit; you're correct; it's a weak
spot.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Iron]
"ASCII" means characters 0-127, which have been standardized since the 1960s.
(See "man ascii", also a good idea if you need to look up a character, or to
convert decimal/hex/octal/character.) Characters 0-31 are nonprintable control
codes, 32-127 are adequate for English and programming languages. On older
computers, the high-bit characters (128-255) weren't avaiable because the OS
used the bit for something else (e.g., Apple ][ used it to represent "inverse
video character"). (Actually, I also remember reading something about the
Apple ][ using the high bit as a strobe bit, meaning a character was received.
It's been twenty years; my memory is faulty.)
</blockQuote>
<blockQuote>
To support other languages, various 8-bit charsets were introduced. The
ISO-8859-x series ("man iso_8859_1") is the most common on UNIX. -1 (aka
LATIN-1) covers Western Europe (Germanic/Romance languages), -2 (aka LATIN-2)
covers Eastern Europe (Slavic languages), -3 (aka LATIN-3) covers miscellaneous
Europe (and Esperanto
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> ).
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
&lt;narrowed eyes behind the dark glasses&gt; You thought I'd miss that, didn't
you? The Revolution Never Sleeps.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Iron]
No, I knew you'd never miss that. You had extensive training, comrade.
</blockQuote>
<blockQuote>
The higher-numbered series cover Cyrillic, Greek,
Turkish, Celtic, etc. New series were added to address deficiencies in previous
series for certain languages, and to add the Euro symbol.
</blockQuote>
<blockQuote>
LATIN-1 is the default charset for the Linux console and xterm, following
widespread UNIX precedent, and because it was convenient for Linus and
most of the original Linux users.
</blockQuote>
<blockQuote>
Codepage 850 and the like are from the DOS world, and do the same thing but in
an incompatible way.
</blockQuote>
<blockQuote>
Russia is in an unusual situation because a native charset, KOI8-r, competes
with ISO-8859-5 and Codepage ???. One advantage of KOI8 is that if the high
bit gets lost, it degenerates cleanly into readable ASCII, and can easily be
converted back by restoring the missing bit. Unfortunately, the makers of
ISO-8859-5 and Codepage ??? didn't think about just adopting the KOI8
character positions. Blame it on the Cold War. Some Russian web sites have
a switch link to switch between the four most common charsets.
</blockQuote>
<blockQuote>
All 8-bit charsets have the disadvantage that they can display only one other
language family + English. If you need to write in two other language families,
you have to use ASCII for one, because the console, xterm and text documents
cannot change charsets in mid-document.
</blockQuote>
<blockQuote>
Unicode, being a 16-bit charset (or more), solves all these problems, but on
Linux it hasn't reached the stage of no-brainer setup or universal support by
all applications.
</blockQuote>
<!-- end 3 -->
<p><hr width="40%" align="center"><p>
<!-- begin 4 -->
<blockquote><img src="../../gx/dennis/bbubble.gif"
height="50" width="60" alt="(!) " border="0"
> [Andreas Daab]
Hi!
</blockQuote>
<blockQuote>
No Problem with <A HREF="http://www.redhat.com/">Red Hat</A> 7.2 and euro under console, <A HREF="http://www.kde.org/">KDE</A> and konsole.
I&quot;m from Germany and have to put the following settings in
/etc/sysconfig/i18n:
</blockQuote>
<blockquote><pre>LANG="de_DE@euro"
SUPPORTED="de_DE@euro:de_DE:de"
SYSFONT="lat0-sun16"
SYSFONTACM="iso15"
</pre></blockquote>
<blockQuote>
Okay, this gives me the euro symbol on the console.
For X and kde remember to use the iso8859-15 charset, your correct language
and country settings. If the euro symbol works in X, set it as curreny symbol
in KDE.
</blockQuote>
<blockQuote>
If you wan't the euro for konsole, use unicode as fontset.
Mozilla shows the euro, if you use the iso8859-15 charset with all fonts and
as default character coding (Preferences/Navigator/Character Coding).
</blockQuote>
<blockQuote>
Hope this works for you.
</blockQuote>
<blockQuote>
Andreas Daab
</blockQuote>
<!-- end 4 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href=""
>Copyright &copy;</a> 2002
<BR>Published in issue 77 of <I>Linux Gazette</I> April 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="../index.html"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->