unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* coding tags and utf-16
@ 2005-12-21  8:00 Werner LEMBERG
  2005-12-23 23:43 ` Werner LEMBERG
  2006-01-04  6:42 ` Kenichi Handa
  0 siblings, 2 replies; 25+ messages in thread
From: Werner LEMBERG @ 2005-12-21  8:00 UTC (permalink / raw)



There is a serious problem with coding tags and utf-16 encodings of
any flavour: Emacs simply can't recognize the tag.  This is a
non-trivial problem.  Right now I'm working on a groff preprocessor
which tries to handle this.  I'm doing the following to find the tag
in an encoding-independent way:

  . Check whether the file starts with the BOM (Byte Order Mark) --
    this is one of the following byte sequences:

      UTF-8:  0xEFBBBF
      UTF-16: 0xFEFF or 0xFFFE

    Skip it.

  . Ignore zero bytes while looking for the -*- coding: ... -*-
    stuff.

This heuristic algorithm might not give correct results in all cases
but it should be sufficiently reliable for normal use.


    Werner

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

end of thread, other threads:[~2006-03-16  2:23 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-21  8:00 coding tags and utf-16 Werner LEMBERG
2005-12-23 23:43 ` Werner LEMBERG
2005-12-24 16:32   ` Richard M. Stallman
2006-01-04  6:42 ` Kenichi Handa
2006-01-04 14:58   ` Werner LEMBERG
2006-01-05  3:46   ` Richard M. Stallman
2006-01-05  4:33     ` Kenichi Handa
2006-01-05 12:24       ` David Kastrup
2006-01-06  0:27         ` Andreas Schwab
2006-01-05 23:11       ` Richard M. Stallman
2006-01-06  1:22         ` Werner LEMBERG
2006-01-06 11:26         ` Kenichi Handa
2006-01-07  4:23           ` Richard M. Stallman
2006-01-07  6:05             ` Kenichi Handa
2006-01-05 15:56   ` Stefan Monnier
2006-01-06  6:31     ` Kenichi Handa
2006-01-06 10:28       ` David Kastrup
2006-02-09  0:32         ` Kevin Rodgers
2006-02-28  1:08           ` Kenichi Handa
2006-03-04 20:34             ` Benjamin Riefenstahl
2006-03-06 13:04               ` Kenichi Handa
2006-03-06 19:35                 ` Benjamin Riefenstahl
2006-03-07  1:02                   ` Kenichi Handa
2006-03-08  5:42               ` Tomas Zerolo
2006-03-16  2:23             ` Kenichi Handa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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