From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: Encoding Problems Date: Tue, 07 Mar 2006 22:06:13 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: <1141735128.070047.257240@u72g2000cwu.googlegroups.com> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1141773969 5685 80.91.229.2 (7 Mar 2006 23:26:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Mar 2006 23:26:09 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 08 00:25:56 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FGlYt-0004Ae-Bf for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Mar 2006 00:25:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGlYt-0003JB-7r for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Mar 2006 18:25:51 -0500 Original-Newsgroups: gnu.emacs.help X-Face: 1; h7XMU[7l}$T@J.D}5z*w8Tg'}B5ArAWc8>2X~otB; kOjKs8X%|hTC#dG:%Vpx")x7S/`v :VXU#fZW$X$zdhEU.RfVQ@<-m9IuN{Hm"fW{,5]6kR'M*vEs+{5Cj!L(JTRzA$(},?5J=sm; %Od List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33632 Archived-At: 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/