From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Nicolas Keller" Newsgroups: gmane.emacs.help Subject: Encoding Problems Date: 7 Mar 2006 04:38:48 -0800 Organization: http://groups.google.com Message-ID: <1141735128.070047.257240@u72g2000cwu.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1141755517 30153 80.91.229.2 (7 Mar 2006 18:18:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Mar 2006 18:18:37 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 07 19:18:31 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 1FGglK-0008Em-AI for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Mar 2006 19:18:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGglJ-0006v3-IF for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Mar 2006 13:18:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!news.glorb.com!postnews.google.com!u72g2000cwu.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Followup-To: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 213.173.163.210 Original-X-Trace: posting.google.com 1141735133 12839 127.0.0.1 (7 Mar 2006 12:38:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 7 Mar 2006 12:38:53 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: u72g2000cwu.googlegroups.com; posting-host=213.173.163.210; posting-account=DgkmPw0AAAAwTyPnpfdEnZhTAwiQNBUu Original-Xref: shelby.stanford.edu gnu.emacs.help:137995 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:33622 Archived-At: 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 =B0 character very often, I have written the following function: (global-set-key "\M-0" 'my-insert-grad) (defun my-insert-grad () (interactive) (insert "=B0")) 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 =3D iso-latin-1-unix) to UTF-8 (C-h C mule-utf-8-unix). If I open the file in VI, insert the =B0 close the file, reopen it in Emacs change something and save it again, the =B0 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