From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: monnier+gnu/emacs@rum.cs.yale.edu, eliz@is.elta.co.il,
emacs-devel@gnu.org
Subject: Re: iso-8859-1 and non-latin-1 chars
Date: Thu, 07 Nov 2002 18:58:50 -0500 [thread overview]
Message-ID: <200211072358.gA7Nwoh16551@rum.cs.yale.edu> (raw)
In-Reply-To: 200211072342.IAA10345@etlken.m17n.org
> In article <200211071706.gA7H6hW09141@rum.cs.yale.edu>, "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:
>
> >> > When encoding text containing non-latin-1 chars with the latin-1
> >> > coding-system, they get output as some kind of escape sequence.
> >>
> >> Yes. IIRC, this is hard-coded in the encoder's C code: it works as if
> >> latin-1 was actually iso-latin-1-wth-esc.
>
> > How can we change that ?
>
> This change will do.
>
> *** european.el.~1.75.~ Wed Nov 6 09:13:16 2002
> --- european.el Fri Nov 8 08:32:12 2002
> ***************
> *** 36,42 ****
> 'iso-latin-1 2 ?1
> "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
> '(ascii latin-iso8859-1 nil nil
> ! nil nil nil nil nil nil nil nil nil nil nil nil t)
> '((safe-charsets ascii latin-iso8859-1)
> (mime-charset . iso-8859-1)))
>
> --- 36,42 ----
> 'iso-latin-1 2 ?1
> "ISO 2022 based 8-bit encoding for Latin-1 (MIME:ISO-8859-1)."
> '(ascii latin-iso8859-1 nil nil
> ! nil nil nil nil nil nil nil nil nil nil nil t t)
> '((safe-charsets ascii latin-iso8859-1)
> (mime-charset . iso-8859-1)))
>
> Or, if this is a problem only for ispell, we can make series
> of "safe" coding-systems for ispell.
I think the problem is only known to bite ispell, but I doubt there
are many other applications that need to (or try to) encode a piece
of text with unsafe chars, so the above patch should be safe.
I also think the patch is correct since it otherwise outputs code
that are not part of latin-1, strictly speaking. If you want such
a behavior, you should use iso-latin-1-with-esc.
The same patch should also be applied for other iso8859-N charsets
I suppose.
> Or, we can add a global flag, say
> `inhibit-unsafe-iso-escape, to tell encoding routine not to
> produces those escape sequences. Then, ispell can let-bind
> that variable to t on encoding.
That seems overkill since you can use iso-latin-1-with-esc instead.
But it would save us from changing all the coding-systems.
Stefan
next prev parent reply other threads:[~2002-11-07 23:58 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-07 14:57 iso-8859-1 and non-latin-1 chars Stefan Monnier
2002-11-07 15:25 ` Eli Zaretskii
2002-11-07 17:06 ` Stefan Monnier
2002-11-07 23:42 ` Kenichi Handa
2002-11-07 23:58 ` Stefan Monnier [this message]
2002-11-09 11:54 ` Richard Stallman
2002-11-09 20:32 ` Stefan Monnier
2002-11-11 10:19 ` Richard Stallman
2002-11-11 4:00 ` Kenichi Handa
2002-11-12 5:47 ` Richard Stallman
2002-11-18 0:08 ` Kenichi Handa
2002-11-18 19:09 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2002-11-28 17:01 Dave Love
2002-12-02 15:47 ` Richard Stallman
2002-12-06 16:38 ` Dave Love
2002-12-09 6:08 ` Kenichi Handa
2002-12-15 16:24 ` Dave Love
2002-12-16 0:42 ` Kenichi Handa
2002-12-19 22:35 ` Dave Love
2002-12-23 6:40 ` Kenichi Handa
2002-12-23 12:27 ` Dave Love
2002-12-25 13:05 ` Kenichi Handa
2002-12-31 17:14 ` Ken Stevens
2003-01-06 19:28 ` Dave Love
2003-01-06 19:18 ` Dave Love
2003-01-07 13:01 ` Kenichi Handa
2003-01-10 10:59 ` Dave Love
2003-01-06 19:19 ` Dave Love
2002-12-16 14:06 ` Stefan Monnier
2002-12-19 22:33 ` Dave Love
2002-12-16 16:42 ` Richard Stallman
[not found] ` <E18LZqb-0007si-00@fencepost.gnu.org>
2002-12-15 16:25 ` Dave Love
2002-12-16 16:42 ` Richard Stallman
[not found] ` <E18LCz8-0004It-00@fencepost.gnu.org>
2002-12-10 23:47 ` Dave Love
2002-12-11 20:39 ` Richard Stallman
2002-12-13 2:58 ` Kenichi Handa
2002-12-14 18:31 ` Richard Stallman
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=200211072358.gA7Nwoh16551@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=eliz@is.elta.co.il \
--cc=emacs-devel@gnu.org \
/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).