From: Xah Lee <xah@xahlee.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Opening file in UTF-8 mode automatically
Date: Sun, 25 Nov 2007 14:49:23 -0800 (PST) [thread overview]
Message-ID: <941d8552-9779-4a2c-bc37-46696e033056@e25g2000prg.googlegroups.com> (raw)
In-Reply-To: 78b46aa5-064f-4977-b425-b30a2f1866bb@a39g2000pre.googlegroups.com
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.
next prev parent reply other threads:[~2007-11-25 22:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-24 16:38 Opening file in UTF-8 mode automatically spamfilteraccount
2007-11-24 18:26 ` Peter Dyballa
2007-11-24 20:09 ` Eli Zaretskii
2007-11-24 18:38 ` Reiner Steib
2007-11-25 5:49 ` spamfilteraccount
2007-11-25 11:33 ` Reiner Steib
2007-11-27 7:12 ` spamfilteraccount
2007-11-24 20:07 ` Eli Zaretskii
[not found] ` <mailman.4039.1195934839.18990.help-gnu-emacs@gnu.org>
2007-11-25 5:51 ` spamfilteraccount
2007-11-25 20:59 ` Eli Zaretskii
[not found] ` <mailman.4082.1196024377.18990.help-gnu-emacs@gnu.org>
2007-11-27 7:14 ` spamfilteraccount
2007-11-27 7:30 ` Zhang Wei
2007-11-27 17:41 ` Reiner Steib
2007-11-27 21:47 ` Eli Zaretskii
[not found] ` <mailman.4200.1196200033.18990.help-gnu-emacs@gnu.org>
2007-11-28 6:54 ` spamfilteraccount
2007-11-27 21:48 ` Eli Zaretskii
2007-11-25 22:49 ` Xah Lee [this message]
2007-11-27 7:15 ` spamfilteraccount
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=941d8552-9779-4a2c-bc37-46696e033056@e25g2000prg.googlegroups.com \
--to=xah@xahlee.org \
--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).