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

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

Re: How to keep character encoding in text file...


From: Eli Zaretskii
Subject: Re: How to keep character encoding in text file...
Date: Thu, 05 Mar 2009 20:50:39 +0200

> From: Marko Myllymaki <firstname.lastname@iki.fi>
> Date: Thu, 05 Mar 2009 13:17:50 +0200
> 
> I usually work with UTF-8 encoded files and my system is set up for 
> UTF-8 (text may be in english, finnish, swedish, german, russian...)
> 
> However, sometimes I edit latin1 -encoded files and I would like to have 
> the encoding automatically kept that way when saving files. Now it seems 
> to change unwantedly to UTF-8 sometimes...

Emacs should do that only if you insert characters that cannot be
encoded with Latin-1.  If that is not the case, i.e. if you find that
Emacs changes encoding from Latin-1 to UTF-8 although _all_ the
characters are encodable in Latin-1, that should be a bug worth
reporting (with a reproducible test case).

> So... if I load UTF-8 encoded file, emacs always saves it that way. If I 
> open latin1-encoded file, it should keep it in the original encoding.

Yes, that's how it's supposed to work, if you don't let any
non-Latin-1 characters creep in.




reply via email to

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