From: Paul Eggert <eggert@cs.ucla.edu>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: emacs-devel@gnu.org
Subject: Re: Email text that confuses charset recognition in emacs
Date: Tue, 16 Apr 2013 21:37:08 -0700 [thread overview]
Message-ID: <516E26F4.1020303@cs.ucla.edu> (raw)
In-Reply-To: <20130416162747.GA11871@saturn>
On 04/16/2013 09:27 AM, Giorgos Keramidas wrote:
> the attached email message confuses the charset
> detection machinery of Emacs, and it starts interpreting all text as
> Japanese text -- even though most of the contents of the file are plain
> us-ascii text.
Although the text is US-ASCII it contains a valid ISO-2022-7bit
coding sequence (the two things are not incompatible)
which Emacs is properly detecting and converting. The problem is that
the text later contains the invalid escape sequence
ESC LF > > SP ( B
This text was intended to switch out of a Japanese charset (the immediately
preceding text is valid ISO-2022-7bit Japanese), but a mailer that
*thought* that the text was ASCII inserted LF > > SP after the ESC
and before the ( B, causing the ESC ( B to be corrupted, so Emacs remains
in Japanese mode until the end of the input.
Perhaps when Emacs is decoding ISO-2022-7bit and sees an invalid
escape sequence, it should switch back to ASCII. That would have
fixed your problem, and wouldn't break the decoding of any valid
ISO-2022-7bit sequence.
next prev parent reply other threads:[~2013-04-17 4:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 16:27 Email text that confuses charset recognition in emacs Giorgos Keramidas
2013-04-17 4:37 ` Paul Eggert [this message]
2013-04-24 15:13 ` Kenichi Handa
2013-04-24 20:34 ` Giorgos Keramidas
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=516E26F4.1020303@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=keramida@ceid.upatras.gr \
/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 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).