[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Encoding Problems
From: |
Reiner Steib |
Subject: |
Re: Encoding Problems |
Date: |
Tue, 07 Mar 2006 22:06:13 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
On Tue, Mar 07 2006, Nicolas Keller wrote:
> I have to use ISO-8859-1 encoding and therefore I have set the
> following in my .emacs file:
>
> (set-language-environment 'german)
> (set-terminal-coding-system 'iso-latin-1)
Are you sure that the terminal really sends iso-latin-1?
> As I use the ° character very often, I have written the following
> function:
>
> (global-set-key "\M-0" 'my-insert-grad)
> (defun my-insert-grad () (interactive) (insert "°"))
>
> Now, when I insert this character and then save the file, sometimes the
> encoding chances without any feedback from ISO-8859-1 (C-h C =
> iso-latin-1-unix) to UTF-8 (C-h C mule-utf-8-unix).
I couldn't reproduce what you describe using a Latin locale
(LC_CTYPE=de_DE@euro). But when I use LC_CTYPE=de_DE.utf8, I can
reproduce it.
I'd suggest to replace...
(set-terminal-coding-system 'iso-latin-1)
with...
(prefer-coding-system 'iso-latin-1)
BTW, instead of my-insert-grad, you could set it for the whole X11
session, e.g. on `Alt-R + 0' or `Alt-R + `':
xmodmap -e 'keysym 0 = 0 parenright degree'
xmodmap -e 'keysym grave = grave asciitilde degree'
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/