From: Gerald Wildgruber <gwil.remove.this.phrase@lrz.uni-muenchen.de>
Subject: auto-recognize utf-8 encoded files upon visiting: solved (sort of...)
Date: 24 Sep 2002 13:45:22 +0200 [thread overview]
Message-ID: <m3u1kfipbh.fsf@lrz.uni-muenchen.de> (raw)
In-Reply-To: m3hegg7j9k.fsf@lrz.uni-muenchen.de
Thanks to everybody who helped answering my question!
What I was trying to do was to make emacs auto-recognize utf-8 encoded
files upon visiting. In the beginning, it didn't.
The problem seems to have been that -- latin-9 being my primary language
environment -- utf-8 only appeared at the end of my priority list for
encodings. Emacs then seems to take my utf-8 file as beeing encoded in one
of the prior coding entries of the priority list (probably as one of the
iso-2022 family). Seems to be an erroneous recognition. Letters beyond
ascii are messed up then.
I didn't want utf-8 to be on the first place of the priority list (because
then all newly cereated files then have it as their default encoding), but
neither on the last one.
If you do a double M-x prefer-coding-system, the first time with utf-8,
the second time with latin-9 as the value, utf is promoted to the second
place of the priority list, latin-9 remains on the first place.
Now without any explicit indication of the encoding (e.g. via file
variables) emacs correctly recognizes the encoding, when I'm visiting
utf-8 files.
To achieve this entry order in the priority list PERMANENTLY I simply put
the following two lines, in this order, into my init file:
(prefer-coding-system 'utf-8)
(prefer-coding-system 'latin-9)
I'm sure there is a cleaner and more elegant solution, but it kind of works.
Last remark:
Charles, thanks for your hint on TEI; I gave TEI a long try many years ago,
when SGML came up, they provided very good introductory material to the
whole issue. But I didn't know of their work on emacs. You say that the
unicode stuff didn't work right on emacs 21.2. I compiled an emacs version
from the CVS sources (http://savannah.gnu.org/projects/emacs/) and there
unicode integration seems to be already more evolved than in the official
distribution. Almost everything works very well. Perhaps you should give it
a try. I'm also working with different languages (cl.greek) and I am very
happy with the evolving unicode capabilities of emacs. I think unicode
integration is THE way by which emacs stops being merely a tool for
programmers and addresses a wider audience also in the humanities.
Gerald.
next prev parent reply other threads:[~2002-09-24 11:45 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-23 16:39 How to make emacs auto-recognize utf-8 encoded files upon visiting Gerald Wildgruber
2002-09-23 23:35 ` Jesper Harder
2002-09-24 3:29 ` Charles Muller
[not found] ` <mailman.1032838300.26368.help-gnu-emacs@gnu.org>
2002-09-24 6:27 ` Miles Bader
2002-09-24 8:59 ` Charles Muller
2002-09-24 15:12 ` Eli Zaretskii
2002-09-25 6:45 ` Charles Muller
2002-09-25 6:55 ` Eli Zaretskii
2002-09-25 8:07 ` Charles Muller
2002-09-25 8:33 ` Charles Muller
2002-09-26 4:42 ` Eli Zaretskii
2002-09-26 7:00 ` Charles Muller
2002-09-26 16:05 ` Eli Zaretskii
2002-09-27 0:36 ` Charles Muller
[not found] ` <mailman.1033086929.4506.help-gnu-emacs@gnu.org>
2002-09-27 1:42 ` Miles Bader
2002-09-27 7:06 ` Charles Muller
[not found] ` <mailman.1033110323.17834.help-gnu-emacs@gnu.org>
2002-09-27 9:07 ` Miles Bader
2002-09-27 11:56 ` Kai Großjohann
2002-09-27 14:10 ` Charles Muller
[not found] ` <mailman.1033135767.32171.help-gnu-emacs@gnu.org>
2002-09-27 14:41 ` Miles Bader
2002-09-27 15:54 ` Stefan Monnier <foo@acm.com>
2002-09-25 9:21 ` Charles Muller
2002-09-25 9:26 ` Charles Muller
2002-09-25 9:41 ` Charles Muller
[not found] ` <mailman.1032936261.7964.help-gnu-emacs@gnu.org>
2002-09-25 8:23 ` Miles Bader
2002-09-25 14:55 ` Stefan Monnier <foo@acm.com>
2002-09-24 19:05 ` tramp Roger Mason
[not found] ` <mailman.1032848900.31556.help-gnu-emacs@gnu.org>
2002-09-24 8:26 ` How to make emacs auto-recognize utf-8 encoded files upon visiting A. Lucien Meyers
2002-09-24 11:45 ` Gerald Wildgruber [this message]
2002-09-24 12:39 ` auto-recognize utf-8 encoded files upon visiting: solved (sort of...) Charles Muller
[not found] ` <mailman.1032871109.14505.help-gnu-emacs@gnu.org>
2002-09-25 14:28 ` A. L. Meyers
2002-09-24 18:57 ` How to make emacs auto-recognize utf-8 encoded files upon visiting Dominic Cronin
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3u1kfipbh.fsf@lrz.uni-muenchen.de \
--to=gwil.remove.this.phrase@lrz.uni-muenchen.de \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.