all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mark Shoulson" <mark@nagas.meson.org>
Cc: 29871@debbugs.gnu.org
Subject: bug#29871: 25.3; ZWJ word-boundaries in regexps
Date: Wed, 27 Dec 2017 22:33:22 +0200	[thread overview]
Message-ID: <83bmijhpwt.fsf@gnu.org> (raw)
In-Reply-To: <87k1x8f0qr.fsf@nagas.meson.org> (mark@nagas.meson.org)

> From: "Mark Shoulson" <mark@nagas.meson.org>
> Date: Wed, 27 Dec 2017 14:07:40 -0500
> 
> According to http://unicode.org/reports/tr29/#Word_Boundaries rule WB4,
> it would seem that a ZWJ character (U+200D ZERO WIDTH JOINER) between
> two "word" characters should not constitute a word boundary.  And yet:
> 
> (string-match "\\<" "foo\u200Dfbar" 1)
> 
> evaluates to 4 (the 1 is to skip the word-beginning at the start of the
> string).  Or you can search for "\\b" or "\\>" and get 3.  Either way,
> indicative of a word-break at the ZWJ character.  Is this correct?

Emacs considers a change of script as a word break, and U+200D's
script is 'symbol', which is different from 'latin', the script of the
ASCII characters.





  reply	other threads:[~2017-12-27 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-27 19:07 bug#29871: 25.3; ZWJ word-boundaries in regexps Mark Shoulson
2017-12-27 20:33 ` Eli Zaretskii [this message]
2019-09-28 23:28 ` Stefan Kangas

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=83bmijhpwt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=29871@debbugs.gnu.org \
    --cc=mark@nagas.meson.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 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.