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: Wed, 17 Aug 2005 21:09:20 +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 1124306075 21639 80.91.229.2 (17 Aug 2005 19:14:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2005 19:14:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 17 21:14:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E5TMm-0000Z3-UR for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Aug 2005 21:14:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E5TO5-0002yQ-Lv for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Aug 2005 15:15:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E5TMz-0002ks-9i for help-gnu-emacs@gnu.org; Wed, 17 Aug 2005 15:14:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E5TMu-0002iY-9t for help-gnu-emacs@gnu.org; Wed, 17 Aug 2005 15:14:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E5TMt-0002gr-Iu for help-gnu-emacs@gnu.org; Wed, 17 Aug 2005 15:14:31 -0400 Original-Received: from [217.72.192.224] (helo=smtp06.web.de) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E5TXh-0003a4-MB for help-gnu-emacs@gnu.org; Wed, 17 Aug 2005 15:25:42 -0400 Original-Received: from [84.245.189.208] (helo=[192.168.1.2]) by smtp06.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.105 #314) id 1E5THu-0008Hp-00; Wed, 17 Aug 2005 21:09:22 +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:28793 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:28793 Am 17.08.2005 um 11:20 schrieb Martin Monsorno: > 7) file bla* > bla.changed-by-eclipse: UTF-8 Unicode text > bla.created-by-eclipse: UTF-8 Unicode text > bla.created-by-emacs: ISO-8859 text > 8) Visiting bla.changed-by-eclipse with emacs shows "=EF=BF=BDberfall" > 9) Visiting bla.chreated-by-eclipse with emacs shows "=C3=BCberfall" > > So we now have 3 files containing the "same" string, 2 of them claim > to be utf-8, but they use a different encoding (2 or 3 bytes). For > all 3 files, when opening the in emacs, buffer-file-coding-system's > value is raw-text-unix. I wouldn't say the files claim to be something -- it's the `file=B4=20 programme that says so, according to some rules in `magic=B4 files. = UTF-8=20 contents usually cannot be distinguished from other contents -- a byte=20= is a byte is a byte. Some UTF-8 files contain a marker by which one can=20= determine, that it's UTF-8. Other markers state that the text is=20 written right to left with a citation left to right. Could be Eclipse=20 writes such a marker ... > >> The C-x RET commands *do not* change a buffer's (or a file's)=20 >> contents, >> they just put some new skin on the buffer so that your view on the >> buffer's (i.e. file's) contents is adapted in a certain way: you can >> see a buffer's (or file's) whatever contents in green, blue, red, >> yellow, cyan ... utf-8, Mac-Roman, NeXT, koi-r8, euc-jp-unix ... >> encoding/view. > > I think I understood this. But this means that I can change the > file-encoding of a file with emacs, doesn't it? Yes. I Usually revert buffer from file with new encoding, C-x RET r=20 RET and save the file in that encoding. I'd say it works=20 reliably! > > What I cite in my mails are the strings as emacs shows them to me when > loading one of the files. So the question is, /why/ are they not > UTF-8? Does eclipse do a wrong latin-1 to utf-8 conversion? > I don't know and use Eclipse. Test is with its own documentation -- and=20= some reliably encoded files! -- Mit friedvollen Gr=FC=DFen Pete "engineer: a mechanism for converting caffeine into designs"