unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marko Myllymaki <firstname.lastname@iki.fi>
To: help-gnu-emacs@gnu.org
Subject: Re: How to keep character encoding in text file...
Date: Fri, 06 Mar 2009 09:39:56 +0200	[thread overview]
Message-ID: <gr4sl.9858$cu3.5293@uutiset.elisa.fi> (raw)
In-Reply-To: <mailman.2443.1236279043.31690.help-gnu-emacs@gnu.org>

Eli Zaretskii wrote:
>> 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.

Okay, that might be the problem... because my system defaults to UTF-8, 
I guess that there is some keyboard input encoding in emacs which uses 
UTF-8.

Therefore if I enter "baz" in latin1 buffer, everything is okay, but 
"foobar åäö" has some UTF-8 and it then forces buffer encoding to UTF-8...

Maybe I could change input encoding depending on file encoding... hmm ;)

Or maybe I try to figure out how to make menu items which force buffer 
encoding and write the file.


  parent reply	other threads:[~2009-03-06  7:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 11:17 How to keep character encoding in text file Marko Myllymaki
2009-03-05 13:33 ` Pascal J. Bourguignon
2009-03-06  7:54   ` Marko Myllymaki
2009-03-05 18:50 ` Eli Zaretskii
     [not found] ` <mailman.2443.1236279043.31690.help-gnu-emacs@gnu.org>
2009-03-06  7:39   ` Marko Myllymaki [this message]
2009-03-06  8:21     ` Pascal J. Bourguignon
2009-03-06  9:44       ` Peter Dyballa
2009-03-06 10:13         ` Nikolaj Schumacher
     [not found]       ` <mailman.2491.1236332716.31690.help-gnu-emacs@gnu.org>
2009-03-06 10:12         ` Pascal J. Bourguignon
2009-03-06 10:57       ` Peter Dyballa
     [not found]       ` <mailman.2504.1236337060.31690.help-gnu-emacs@gnu.org>
2009-03-07  9:05         ` Marko Myllymaki
2009-03-06 10:51     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='gr4sl.9858$cu3.5293@uutiset.elisa.fi' \
    --to=firstname.lastname@iki.fi \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).