how can i use ISO-8859-1??

Roland Smith rsmith at
Tue Sep 9 16:55:07 UTC 2008

On Mon, Sep 08, 2008 at 09:35:07PM -0700, Gary Kline wrote:
> 	Guys,
> 	This is one of the I've-been-meaning-to-ask questions;
> 	but other things keep happening that took precedence.  Now
> 	it's time to ask what are the voodoo commands to set up in my
> 	~/.zshrc or other initiation files (probably including my muttrc)
> 	that will let me print to stdout, characters like the "e-aigu"
> 	or "u-umlaut" and the currency pound or Euro?
Why settle for ISO-8859-1? Switch to UTF-8 instead, wich can display a
much larger number of characters, and is becoming the standard.

I added the following to the 'setenv' section of the 'default' profile
in login.conf:


AFAICT, the console doesn't have UTF-8 fonts (yet?). But that doesn't
bother me because I always use X anyway.

So I added the following to my ~/.xinitrc as well:

  export LANG=en_US.UTF-8

I installed the rxvt-unicode terminal emulator because it's a lot
lighter then xterm, although both should handle UTF-8. You should use a
unicode font though. I put the following in my ~/.Xresources:

  ! for xterm
  XTerm*foreground: white
  XTerm*background: #010040
  XTerm*utf8: 2
  XTerm*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
  XTerm*title: Shell
  XTerm*loginShell: True
  XTerm*scrollBar: False
  XTerm*saveLines: 0
  XTerm*ttyModes: erase ^H
  XTerm*vt100.translations: #override \
        Home:      string("\033[1~") \n\
        Delete:    string("\033[3~") \n\
        End:       string("\033[4~")

  ! for urxvt
  Rxvt*foreground: white
  Rxvt*background: #010040
  Rxvt*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
  urxvt_transp*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1
  Rxvt*title: Shell
  Rxvt*loginShell: True
  Rxvt*scrollBar: False
  Rxvt*saveLines: 0

The critical part is the font specification; it should end with iso10646-1.

My /etc/csh.cshrc has some settings for less:

  setenv  LESSOPEN        '|/usr/bin/ %s'
  setenv  LESSCHARSET     utf-8

Mutt has to be told as well, in ~/.muttrc:

  set charset="utf-8"
  set send_charset="us-ascii:iso-8859-15:utf-8"

In ~/.emacs.el(c) there are some settings as well:

  ;; Set language environment for MULE. 
  (set-language-environment 'UTF-8)

  ;; My customization for text modes
  (defun my-text-mode-hook ()
    (auto-fill-mode 1)
    (show-paren-mode t)
    (activate-input-method 'rfc1345) ; Good input method for UTF-8
(add-hook 'text-mode-hook 'my-text-mode-hook)

Other programs you should look at are Firefox: edit -> preferences ->
content tab -> Font & Colors, advanced button; default encoding ->
select "Unicode (UTF-8)".

Other programs may have settings for unicode, but these are the ones
that spring to mind.

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list