Article View: news.software.readers
Article #192376Re: slrn and accented characters
From: Peter J Ross
Date: Sun, 05 Nov 2006 17:24
Date: Sun, 05 Nov 2006 17:24
94 lines
4002 bytes
4002 bytes
On Wed, 01 Nov 2006 01:29:59 GMT, SINNER
<99nesorjd@gates_of_hell.invalid> wrote in news.software.readers:
> * Peter J Ross wrote in news.software.readers:
>
> [...]
>
>> My suggestions for Gnome-Terminal and Konsole also work in
>> Debian/Testing. The suggestion for Xterm *should* work too, but I
>> haven't had a chance to test it yet.
>
> My new mission is to figure out how to make Gnome Terminal default to
> the appropriate encodeing. It dosent seem to save that attribute with
> the profile.
You can set the default encoding for the whole Gnome session when
logging in with GDM, but you can't set it for Gnome-Terminal only.
KDE/Konsole has a similar problem.
However, the following ought to work in (K/X)Ubuntu 6.10 and might
work in 6.06 too. Beware of wrapped text! Everything between verbatim
marks (#v+ #v-) should be a single line. Change each instance of
"en_US" and "ISO-8859-15" to what you require.
1. If necessary, generate the required locale, as previously
suggested. E.g.,
#v+
$ sudo locale-gen en_US.ISO-8859-15
#v-
2. Install luit:
#v+
$ sudo apt-get install luit
#v-
3. Work around a bug that causes luit to look for locale.alias in the
wrong place, by adding a link:
#v+
$ sudo ln -sv /usr/share/X11/locale/locale.alias /usr/lib/X11/locale/locale.alias
#v-
(locale.alias may already be in the right place on Ubuntu 6.06, so
don't worry if you get an error here.)
4. Open a new terminal or tab. Don't alter the encoding from the
default UTF-8. (In fact, you should be able to remove the non-default
encoding I suggested in a previous post.)
5. In the terminal, run luit with the appropriate locale and encoding,
calling slrn after sleeping for 1 second as a workaround for YET
ANOTHER luit bug:
#v+
$ LANG=en_US.ISO-8859-15 luit -encoding ISO-8859-15 sh -c "sleep 1; slrn"
#v-
Check that everything's OK, and that the locale returns to UTF-8 after
exiting slrn. (If you get an "unable to set locale" error, return to
step 1 and check that the locale you've specified is installed.)
6. If that works, create an alias to save typing or searching the
history:
#v+
$ echo "alias slrnx='LANG=en_US.ISO-8859-15 luit -encoding ISO-8859-15 sh -c \"sleep 1; slrn\"'" >> ~/.bashrc
#v-
You can check that you see this in ~/.bashrc:
#v+
alias slrnx='LANG=en_US.ISO-8859-15 luit -encoding ISO-8859-15 sh -c "sleep 1; slrn"'
#v-
7. Open a new terminal or tab and check that the alias works:
#v+
$ slrnx
#v-
Much of this will probably also work for anybody using slrn-0.9.8.1pl1
on X with any flavour of *nix in a UTF-8 environment, but older and
forthcoming versions of X may not need the luit workarounds.
PJR :-)
--
_ _(o)_(o)_ _ | The fool hath said in his heart, "There is no Cabal."
._\`:_ F S M _:' \_, | FSM: <http://www.venganza.org/>
/ (`---'\ `-. | AUK: <http://www.netcabal.com/auk/>
,-` _) (_, F_P | PJR: <http://insurgent.org/~pjr/>
Technical Details
Message-ID:
<slrneks7i3.cjc.pjr@nntp.alcatroll.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news.alt.net!nntp.alcatroll.com!not-for-mailReferences:
<HPx0h.9$Sl5.0@newsfe05.lga> <slrnekct0a.5hh.pjr@nntp.alcatroll.com> <ccgi14xrp5.ln2@news.gates-of-hell.com> <slrnekfmu6.5bd.pjr@nntp.alcatroll.com> <vk9l14xe67.ln2@news.gates-of-hell.com>Show Full Headers
Complete Article Headers
Message-ID: <slrneks7i3.cjc.pjr@nntp.alcatroll.com> Subject: Re: slrn and accented characters Date: Sun, 05 Nov 2006 17:24:19 +0000 From: Peter J Ross <pjr@kookbusters.org> References: <HPx0h.9$Sl5.0@newsfe05.lga> <slrnekct0a.5hh.pjr@nntp.alcatroll.com> <ccgi14xrp5.ln2@news.gates-of-hell.com> <slrnekfmu6.5bd.pjr@nntp.alcatroll.com> <vk9l14xe67.ln2@news.gates-of-hell.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-in-01.newsfeed.easynews.com!easynews.com!easynews!news.alt.net!nntp.alcatroll.com!not-for-mail Newsgroups: news.software.readers Organization: Cabal Obsidian Order [TINCOO] Lines: 94 X-Operating-System: Debian GNU/Linux (Sarge/Stable) X-Kernel: Linux 2.4.27-3-686 User-Agent: slrn/0.9.8.1 (Debian)