From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: how to change file coding system Date: Tue, 16 Aug 2005 13:20:00 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1124194189 10833 80.91.229.2 (16 Aug 2005 12:09:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Aug 2005 12:09:49 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 16 14:09:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E50Fo-0005l0-0n for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Aug 2005 14:09:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E50JD-0002z2-RS for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Aug 2005 08:12:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E4zbB-0007rR-P4 for help-gnu-emacs@gnu.org; Tue, 16 Aug 2005 07:27:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E4zas-0007lV-1B for help-gnu-emacs@gnu.org; Tue, 16 Aug 2005 07:26:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4zar-0007iW-My for help-gnu-emacs@gnu.org; Tue, 16 Aug 2005 07:26:57 -0400 Original-Received: from [217.72.192.225] (helo=smtp07.web.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E4zje-000620-SO for help-gnu-emacs@gnu.org; Tue, 16 Aug 2005 07:36:03 -0400 Original-Received: from [84.245.189.93] (helo=[192.168.1.2]) by smtp07.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.105 #314) id 1E4zU9-0007wm-00; Tue, 16 Aug 2005 13:20:02 +0200 In-Reply-To: X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: Martin Monsorno X-Mailer: Apple Mail (2.622) X-Sender: Peter_Dyballa@web.de 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:28752 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28752 Am 16.08.2005 um 11:22 schrieb Martin Monsorno: > ,---- > | monsorno@mmdev ~/work/workspace.c/gmx $ file bla* > | bla.eclipse: UTF-8 Unicode text > | bla.emacs: ISO-8859 text > `---- > > Opening "bla.eclipse" with emacs, shows me the string > "=EF=BF=BDberfall". Changing the file encoding with "C-x f > iso-latin-1-unix" and saving leads to: The correct way would have been, once you've opened the file=20 bla.eclipse and Emacs came up showing `-0:=B4 as start of the mode-line=20= (stating ISO Latin-1 or ISO Latin-15 encoding), C-x r utf-8-unix=20= : re-open the file in UTF-8 encoding, to view it in its natural=20 mood. When you now save the file in ISO Latin-1 encoding, having applied C-x=20= f (set-buffer-file-coding-system), GNU Emacs does the conversion.=20= Instead of C3 BC it writes only FC. The file size will be reduced by=20 one byte. The C-x RET commands *do not* change a buffer's (or a file's) contents,=20= they just put some new skin on the buffer so that your view on the=20 buffer's (i.e. file's) contents is adapted in a certain way: you can=20 see a buffer's (or file's) whatever contents in green, blue, red,=20 yellow, cyan ... utf-8, Mac-Roman, NeXT, koi-r8, euc-jp-unix ...=20 encoding/view. Eclipse might be fooling you. The character `=FC=B4 is encoded in UTF-8 = as=20 C3 BC or, translating the two hex codes into ISO Latin-1 (or -15)=20 characters, as: =C3 =B3. What you cite in your eMail, =EF=BF=BD or in = HTML=20 �, is *not* UTF-8. -- Greetings Pete "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, Historical Review of Pennsylvania.