unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to make emacs auto-recognize utf-8 encoded files upon visiting
@ 2002-09-23 16:39 Gerald Wildgruber
  2002-09-23 23:35 ` Jesper Harder
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Gerald Wildgruber @ 2002-09-23 16:39 UTC (permalink / raw)



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)?

I'm aware of how to do this with File Variables (either by using the
`-*-...-*-' construct or a local variables list at the end of the file).
Both of them work well. Setting `(prefer-coding-system 'utf-8)' in `.emacs'
also works, but is kind of intrusive as all new files are then using this
encoding by default.

Even without file variables, Emacs does correctly recognize the encoding
when visiting latin-1 or latin-9 encoded files. Yet it fails when visiting
utf-8 encoded files. I get the `-:--' abbrev on the encoding part of the
modeline, and letters beyond ascii are messed up.

Can anyone give me a hint on how to make emacs find the correct coding
system (without setting it explicitly through file variables)?

Thanks,

Gerald.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2002-09-27 15:54 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` How to make emacs auto-recognize utf-8 encoded files upon visiting Dominic Cronin

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).