[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Change encoding
From: |
Eli Zaretskii |
Subject: |
Re: Change encoding |
Date: |
Fri, 07 Aug 2009 22:20:19 +0300 |
> From: Christophe Jorssen <christophe.jorssen@libre.fr.invalid>
> Date: 07 Aug 2009 17:50:59 GMT
>
> I'd like to know if it is possible to change the encoding of a buffer.
> For exemple, my buffer is encoded in ansinew and I'd like to recode it in
> utf-8.
Type "C-x RET f utf-8 RET", and you are done.
> And, by the way, is it possible to "read a file with this encoding", that
> is automatically convert the encoding of a file when opened (say the file
> is encoded in ansinew and I'd like to have it in my buffer encoded in
> utf-8).
No, it's not possible. Emacs by preserves the encoding of the
original file, and it's easy enough to do what you want with the
command I show above.
Of course, you could also easily enough write a replacement for
find-file which does what you want automatically: change the value of
buffer-file-coding-system after you visit the file.