Date: Tue, 9 Sep 2008 18:54:56 +0200 From: Roland Smith <rsmith@xs4all.nl> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: how can i use ISO-8859-1?? Message-ID: <20080909165456.GA56556@slackbox.xs4all.nl> In-Reply-To: <20080909043503.GA21663@thought.org> References: <20080909043503.GA21663@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080909165456.GA56556>
