Localization/Guide/The Euro symbol

From Gentoo Wiki
Jump to: navigation, search
Resources

An article describing how to display the Euro symbol (€) for the console and in X.

The Euro symbol for the console

OpenRC

In order to get the console to display the Euro symbol, the consolefont variable will need to be set in /etc/conf.d/consolefont to a file found in /usr/share/consolefonts/ (without the .psfu.gz). lat9w-16 has the Euro symbol.

FILE /etc/conf.d/consolefontSetting the console font
consolefont="lat9w-16"

For more details see the consolefont section in Sakaki's EFI Install Guide.

Verify that the consolefont service is in the boot runlevel:

root #rc-update -v show | grep consolefont

If no runlevel is displayed for consolefont, then add it to the proper level:

root #rc-update add consolefont boot

The Euro symbol in X

Most applications

Getting the Euro symbol to work properly in X is a little bit tougher. First change the fixed and variable definitions in /usr/share/fonts/misc/fonts.alias to end in iso8859-15 instead of iso8859-1.

CODE Setting default X fonts
fixed        -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
variable     -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15

Some applications use their own font, they will need to be separately configured to use a font with the Euro symbol. This can be enacted on a user-specific level in .Xdefaults (copy this file to /etc/skel/ for use by new users), or at a global level for any application with a resource file in /usr/share/X11/app-defaults/ (like xterm). In these files, generally an existing line will need modified, rather than adding a new line to the file. To change the xterm font, for instance:

user $echo 'XTerm*font: fixed' >> ~/.Xresources
user $xrdb -merge ~/.Xresources

The Euro symbol in (X)Emacs

To use the Euro symbol in (X)Emacs, add the following to the .Xdefaults file:

FILE ~/.XdefaultsSetting the font for emacs
Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15

For XEmacs (not plain Emacs), add the following line to ~/.xemacs/init.el:

FILE ~/.xemacs/init.elSetting the font for xemacs
(define-key global-map '(EuroSign) '[€])