[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opening file in UTF-8 mode automatically
From: |
Xah Lee |
Subject: |
Re: Opening file in UTF-8 mode automatically |
Date: |
Sun, 25 Nov 2007 14:49:23 -0800 (PST) |
User-agent: |
G2/1.0 |
Not sure about auto-detecting, but i work with utf-8 daily and never
have a problem.
I do, however, set my emacs to use utf-8 by default.
To set your file encoding in emacs, use the menu "Options→Mule
(Multilingual Environment)→Set Language Environment".
After you've pulled the menu, be sure to also pull the menu command
"Options→Save Options" so that emacs remembers your settings.
or
Alt+x set-language-environment UTF-8
See also:
* Emacs and Unicode tips
http://xahlee.org/emacs/emacs_n_unicode.html
Xah
xah@xahlee.org
\xAD\xF4 http://xahlee.org/
On Nov 24, 8:38 am, "spamfilteracco...@gmail.com"
<spamfilteracco...@gmail.com> wrote:
> I need to edit some UTF-8 files and it's very annoying emacs doesn't
> detect it automatically (I have to reopen them as utf-8 manually) and
> sometimes I notice it only after I already edited and saved the file
> which messes up the formatting.
>
> I tried prefer-coding-system utf-8, but it didn't help.
>
> I can't put lisp code into the files, because they are data files.
>
> Is there a definitive way to do it? The BOM is at the beginning of the
> files, so Emacs could detect it automatically.
>
> It's emacs 22.
- Re: Opening file in UTF-8 mode automatically, (continued)
- Re: Opening file in UTF-8 mode automatically, Eli Zaretskii, 2007/11/24
- Message not available
- Re: Opening file in UTF-8 mode automatically, address@hidden, 2007/11/25
- Re: Opening file in UTF-8 mode automatically, Eli Zaretskii, 2007/11/25
- Message not available
- Re: Opening file in UTF-8 mode automatically, address@hidden, 2007/11/27
- Re: Opening file in UTF-8 mode automatically, Zhang Wei, 2007/11/27
- Re: Opening file in UTF-8 mode automatically, Eli Zaretskii, 2007/11/27
- Re: Opening file in UTF-8 mode automatically, Reiner Steib, 2007/11/27
- Message not available
- Re: Opening file in UTF-8 mode automatically, address@hidden, 2007/11/28
- Re: Opening file in UTF-8 mode automatically, Eli Zaretskii, 2007/11/27
Re: Opening file in UTF-8 mode automatically,
Xah Lee <=