all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to change file coding system
Date: Tue, 16 Aug 2005 13:20:00 +0200	[thread overview]
Message-ID: <da3c8e42509cfccfbf28761c6c91a78a@Web.DE> (raw)
In-Reply-To: <ddsb79$7s3$1@schlund.de>


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
> "�berfall".  Changing the file encoding with "C-x <RET> f
> iso-latin-1-unix" and saving leads to:

The correct way would have been, once you've opened the file 
bla.eclipse and Emacs came up showing `-0:´ as start of the mode-line 
(stating ISO Latin-1 or ISO Latin-15 encoding), C-x <RET> r utf-8-unix 
<RET>: re-open the file in UTF-8 encoding, to view it in its natural 
mood.

When you now save the file in ISO Latin-1 encoding, having applied C-x 
<RET> f (set-buffer-file-coding-system), GNU Emacs does the conversion. 
Instead of C3 BC it writes only FC. The file size will be reduced by 
one byte.

The C-x RET commands *do not* change a buffer's (or a file's) 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.


Eclipse might be fooling you. The character `ü´ is encoded in UTF-8 as 
C3 BC or, translating the two hex codes into ISO Latin-1 (or -15) 
characters, as: à ³. What you cite in your eMail, � or in HTML 
&iuml;&iquest;&frac12;, 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.

  reply	other threads:[~2005-08-16 11:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12  8:34 how to change file coding system Martin Monsorno
2005-08-12 11:30 ` Eli Zaretskii
     [not found] ` <mailman.3519.1123846596.20277.help-gnu-emacs@gnu.org>
2005-08-12 12:32   ` Pascal Bourguignon
2005-08-12 15:04     ` Eli Zaretskii
2005-08-12 15:36     ` Peter Dyballa
2005-08-12 13:33   ` Martin Monsorno
2005-08-12 15:06     ` Eli Zaretskii
2005-08-12 15:52     ` Pascal Bourguignon
2005-08-12 16:33       ` Joe Corneli
     [not found]     ` <mailman.3561.1123859480.20277.help-gnu-emacs@gnu.org>
2005-08-16  9:22       ` Martin Monsorno
2005-08-16 11:20         ` Peter Dyballa [this message]
2005-08-17  4:07         ` Eli Zaretskii
     [not found]         ` <mailman.3911.1124191758.20277.help-gnu-emacs@gnu.org>
2005-08-17  9:20           ` Martin Monsorno
2005-08-17 12:22             ` Martin Monsorno
2005-08-17 19:09             ` Peter Dyballa
     [not found]             ` <mailman.4075.1124306087.20277.help-gnu-emacs@gnu.org>
2005-08-18  8:40               ` Martin Monsorno
2005-08-18 11:37                 ` Peter Dyballa
     [not found]                 ` <mailman.4171.1124367223.20277.help-gnu-emacs@gnu.org>
2005-08-19 10:20                   ` Martin Monsorno
2005-08-19 13:24                     ` Peter Dyballa
     [not found]                     ` <mailman.4307.1124458248.20277.help-gnu-emacs@gnu.org>
2005-08-23  9:20                       ` Martin Monsorno
     [not found]         ` <mailman.4004.1124251989.20277.help-gnu-emacs@gnu.org>
2005-08-17  9:26           ` Martin Monsorno
2005-08-17 18:23             ` Eli Zaretskii
     [not found]             ` <mailman.4071.1124303238.20277.help-gnu-emacs@gnu.org>
2005-08-18  8:05               ` Martin Monsorno
2005-08-19  8:14                 ` Eli Zaretskii
2005-08-23 21:23                 ` Jason Rumney
2005-08-25  7:52                   ` Martin Monsorno
2005-08-25 22:18                     ` Peter Dyballa
     [not found]                     ` <mailman.5086.1125044809.20277.help-gnu-emacs@gnu.org>
2005-08-26  9:52                       ` Martin Monsorno
2005-08-26 10:48                         ` Peter Dyballa
2005-08-26 18:12                           ` Kevin Rodgers
2005-08-26 18:56                             ` Peter Dyballa
2005-08-26  9:59                       ` Reiner Steib
2005-08-29  0:51                     ` Jason Rumney
2005-08-31  8:46                       ` Martin Monsorno
2005-08-31  9:18                         ` Martin Monsorno
2005-08-31  9:56                           ` Reiner Steib
2005-09-08 15:21                             ` Martin Monsorno
2005-08-31  9:55                         ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da3c8e42509cfccfbf28761c6c91a78a@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.