How to get ISO-8859-1 (Latin-1) locale on Ubuntu

Submitted by Sketch on Tue, 2011-05-03 20:15

Ever had trouble setting up TinyFugue or a PennMUSH game to use the ISO-8859-1 (Latin-1) character set? Me too. On Debian, it's a simple "sudo dpkg-reconfigure locales", which offers a helpful menu. Ubuntu, defaulting to UTF-8 and not really wanting to let go, makes things a little messier. Here's how I got it to work, each and every time.

Step 1: Edit /var/lib/locales/supported.d/local with your favorite editor, and on the last line put "en_US.ISO-8859-1 ISO-8859-1". Mine looks like this:
en_US.UTF-8 UTF-8
en_US.ISO-8859-1 ISO-8859-1

Step 2: sudo dpkg-reconfigure locales

Step 3:
To get TinyFugue to use Latin-1, put /setenv LC_CTYPE=en_US.ISO-8859-1 in your .tfrc file.
To get PennMUSH to use Latin-1, edit the pennmush/game/restart script so that the line that is normally #LANG=fr_FR is LANG=en_US.ISO-8859-1. Applying the change to PennMUSH will require a full restart, not just @shutdown/restart.

(Step 4, screen + TinyFugue:
You'll have to change screen's incoming encoding, which assumes UTF-8. Do ctrl+a [colon] encoding ISO-8859-1 [enter].)

(Thanks to http://tlug.dnho.net/?q=node/237)