help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Encoding Problems


From: Nicolas Keller
Subject: Encoding Problems
Date: 7 Mar 2006 04:38:48 -0800
User-agent: G2/0.2

Hi!

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)

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).

If I open the file in VI, insert the ° close the file, reopen it in
Emacs change something and save it again, the ° character leaves
untouched and the encoding stays as it is. So I guess I have to enhance
the function?

How can I tell Emacs to automatically keep the ISO-8859-1 encoding when
I save the file after inserting this character?

Thanks in advance,

Nicolas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]