help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Encoding Issue on Windows


From: Peter Dyballa
Subject: Re: File Encoding Issue on Windows
Date: Wed, 13 Mar 2013 23:16:25 +0100

Am 13.03.2013 um 22:11 schrieb Tech Stuff:

> apparently I saved the files with the wrong encoding.  So now I think that I 
> really have those incorrect characters.

Why? Before your failure the file had 31 bytes contents. In some code page this 
represents 31 characters, in UTF-8 this represents 29 characters.

When you save a text in UTF-8 encoding in some 8-bit code page *and* *you* *do* 
*not* *change* *one* *single* *byte* then the file's contents is not changed 
(because GNU Emacs does not change a single byte). What's changed, for the 
application that displays this file's contents, is the perspective. Example: as 
a child on four extremities you could only see from aside the green of a 
carrot. As a grown-up you can look down on the same green (and know that 
something with a different colour is below the surface). And when you're dead 
you'll see what the other colour is.

Same bytes, different perspectives, different (re)presentations for you.

Or consider a series of bit and bytes in a computer's memory. Some computers 
read the same sequence  and interpret the first eight bits as the Most 
Significant Byte, others assume it's the Least Significant Byte, one sees that 
your bank account has a credit, the other sees the debit.

So just try to "switch" through some encodings! And don't forget to watch the 
mode-line: Does it signal a modified file while switching? And: Does it work to 
save an unmodified file? (What has this to do with encodings?!)

--
Greetings

  Pete

The day Microsoft makes something that doesn't suck is the day they start 
selling vacuum cleaners.
                                – Ernest Jan Plugge




reply via email to

[Prev in Thread] Current Thread [Next in Thread]