all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Nelson H. F. Beebe" <beebe@math.utah.edu>
Cc: 5700@debbugs.gnu.org
Subject: bug#5700: emacs-23 and 8-bit characters in 128..255
Date: Tue, 09 Mar 2010 17:02:14 -0500	[thread overview]
Message-ID: <jwvy6i19n4v.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CMM.0.95.0.1268164291.beebe@psi.math.utah.edu> (Nelson H. F. Beebe's message of "Tue, 9 Mar 2010 12:51:31 -0700 (MST)")

> This morning, I set out to track down the source of one of the
> problems in a function that I use a lot, and eventually narrowed it to
> the failure of functions like these:

>     (string-equal (buffer-substring (point) (1+ (point))) "\377")

Indeed, we have a problem:

  (string-equal "\377" (string-to-multibyte "\377"))

returned t in Emacs-22 but returns nil in Emacs-23.  Another (somewhat
related) problem is that under Emacs-22, we had:

  "\377"                        prints as    "\377"
  "\xff"                        prints as    "\xff"
  (multibyte-string-p "\377")   prints as    "\xff"

which seems acceptable, whereas under Emacs-23 we have:

  "\377"                        prints as    "ÿ"
  "\xff"                        prints as    "ÿ"
  (multibyte-string-p "\377")   prints as    "\377"

which looks rather confusing.

>     (looking-at "\377")

This is probably a separate bug.

>     The internal encoding used for buffers and strings is now
>     Unicode-based and called `utf-8-emacs' (`emacs-internal' is an alias

It is related, but only to the extent that a lot of the code that
handles multibyte chars (and especially "eight-bit chars") was
completely rewritten, and this is a very delicate area.


        Stefan






  reply	other threads:[~2010-03-09 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 19:51 bug#5700: emacs-23 and 8-bit characters in 128..255 Nelson H. F. Beebe
2010-03-09 22:02 ` Stefan Monnier [this message]
2016-07-06 23:52   ` npostavs
2016-07-07 16:21     ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvy6i19n4v.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=5700@debbugs.gnu.org \
    --cc=beebe@math.utah.edu \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.