[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: Re: Inadequate documentation of silly characters on screen.
From: |
Stephen J. Turnbull |
Subject: |
Re: Fwd: Re: Inadequate documentation of silly characters on screen. |
Date: |
Fri, 20 Nov 2009 12:13:51 +0900 |
Stefan Monnier writes:
> Indeed XEmacs does not represent chars as integers, and that can
> eliminate several sources of problems. Note that this problem is new in
> Emacs-23, since in Emacs-22 (and in XEmacs, IIUC), there was no
> character whose integer value was between 127 and 256, so there was no
> ambiguity.
In XEmacs:
(char-int-p 241) => t
(int-char 241) => ?ñ
No problems with this that I can recall, except a few people with code
that did
(set-face-font 'default "-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-2")
and expected `(insert (int-char 241))' to display `ń' instead of
`ñ'.
(For the non-Mule-implementers, this hack works without Mule but won't
work in Mule because Mule matches those two trailing fields to the
character's charset, and 241 corresponds to a Latin-1 character, so a
"-*-*-*-*-*-*-*-*-*-*-*-*-iso8859-1" font from the set associated with
the default face will be used.)
For this reason, using char-int and int-char in XEmacs is generally a
bug unless you want to examine the internal coding system; you almost
always want to use make-char. (Of course for ASCII values it's an
accepted idiom, but still a bad habit.)
> AFAIK most of the programming errors we've had to deal with over the
> years (i.e. in Emacs-20, 21, 22) had to do with incorrect (or missing)
> encoding/decoding and most of those errors existed just as much on
> XEmacs
I don't think that's true; AFAIK we have *no* recorded instances of
the \201 bug, while that regression persisted in GNU Emacs (albeit a
patched version, at first) from at the latest 1992 until just a few
years ago. I think it got fixed in Mule (ie, all paths into or out of
a text object got a coding stage) before that was integrated into
XEmacs or Emacs, and the regression when Mule was integrated into
Emacs was cause by the performance hack, "text object as unibyte".
> because there's no way to fix them right in the infrastructure code
> (tho XEmacs may have managed to hide them better by detecting the
> lack of encoding/decoding and guessing an appropriate coding-system
> instead).
I don't know of any such guessing. When the user asks us to, we guess
on input, just as you do, but once we've got text in internal format,
there is no more guessing to be done. Emacs will encounter the need
to guess because you support "text object as unibyte".
Vive la difference technical!
;-)
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., (continued)
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Stefan Monnier, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Alan Mackenzie, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Andreas Schwab, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Aidan Kehoe, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Alan Mackenzie, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Aidan Kehoe, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Stephen J. Turnbull, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Eli Zaretskii, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Eli Zaretskii, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Stefan Monnier, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen.,
Stephen J. Turnbull <=
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., David Kastrup, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Alan Mackenzie, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Davis Herring, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Alan Mackenzie, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., David Kastrup, 2009/11/19
- Re: Fwd: Re: Inadequate documentation of silly characters on screen., Richard Stallman, 2009/11/21
- Displaying bytes (was: Inadequate documentation of silly characters on screen.), Stefan Monnier, 2009/11/22
- Re: Displaying bytes (was: Inadequate documentation of silly characters on screen.), Richard Stallman, 2009/11/23
- Re: Displaying bytes (was: Inadequate documentation of silly characters on screen.), Per Starbäck, 2009/11/23
- Re: Displaying bytes (was: Inadequate documentation of silly characters on screen.), Richard Stallman, 2009/11/24