From: Dominic Cronin <dominic@ReplaceThisBitWithMySurname.co.uk>
Subject: Re: How to make emacs auto-recognize utf-8 encoded files upon visiting
Date: Tue, 24 Sep 2002 20:57:01 +0200 [thread overview]
Message-ID: <l1d1pus4168vtjooc80q8eev5omac6vhae@4ax.com> (raw)
In-Reply-To: m3hegg7j9k.fsf@lrz.uni-muenchen.de
On 23 Sep 2002 18:39:19 +0200, Gerald Wildgruber
<gwil.remove.this.phrase@lrz.uni-muenchen.de> wrote:
>
>Hello,
>
>I'm trying to make my emacs (GNU Emacs 21.3.50.1 on linux) auto-recognize
>the right encoding when visiting files with utf-8 encoding. The emacs info
>help entry says on the topic:
>
>"Some coding systems can be recognized or distinguished by which byte
>sequences appear in the data. However, there are coding systems that cannot
>be distinguished, not even potentially."
>
>Does this also apply to utf-8 encoded files? Is it impossible for emacs to
>auto-recognize them (as for example the `file' command on the shell does)?
The RFC for UTF-8 (see http://www.ietf.org/rfc/rfc2279.txt) states:
UTF-8 strings can be fairly reliably recognized as such by a simple
algorithm, i.e. the probability that a string of characters in any
other encoding appears as valid UTF-8 is low, diminishing with
increasing string length.
BTW - the RFC is quite an interesting read: an elegant solution to a
problem.
--
Dominic Cronin
Amsterdam
prev parent reply other threads:[~2002-09-24 18:57 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 ` auto-recognize utf-8 encoded files upon visiting: solved (sort of...) Gerald Wildgruber
2002-09-24 12:39 ` 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 ` Dominic Cronin [this message]
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=l1d1pus4168vtjooc80q8eev5omac6vhae@4ax.com \
--to=dominic@replacethisbitwithmysurname.co.uk \
/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).