From owner-freebsd-questions@FreeBSD.ORG Tue Sep 9 16:55:07 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0FF1065672 for ; Tue, 9 Sep 2008 16:55:07 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by mx1.freebsd.org (Postfix) with ESMTP id 799788FC20 for ; Tue, 9 Sep 2008 16:55:07 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id m89Gt1Yo011789; Tue, 9 Sep 2008 18:55:02 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id AC08ABA96; Tue, 9 Sep 2008 18:54:56 +0200 (CEST) Date: Tue, 9 Sep 2008 18:54:56 +0200 From: Roland Smith To: Gary Kline Message-ID: <20080909165456.GA56556@slackbox.xs4all.nl> References: <20080909043503.GA21663@thought.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <20080909043503.GA21663@thought.org> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: FreeBSD Mailing List Subject: Re: how can i use ISO-8859-1?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 16:55:07 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 08, 2008 at 09:35:07PM -0700, Gary Kline wrote: > Guys, >=20 > 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? =20 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: LC_ALL=3Den_US.UTF-8 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=3Den_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-iso1064= 6-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/lesspipe.sh %s' setenv LESSCHARSET utf-8 Mutt has to be told as well, in ~/.muttrc: set charset=3D"utf-8" set send_charset=3D"us-ascii:iso-8859-15:utf-8" In ~/.emacs.el(c) there are some settings as well: ;; Set language environment for MULE.=20 (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. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjGqmAACgkQEnfvsMMhpyVCBACcD5mSuFIoN81EOEut/NOzm77w vqAAoJzXMCYGsQnpcjgWTYLc1/rhYyoV =KLFJ -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--