all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Mark Shoulson <mark@nagas.meson.org>, 29871@debbugs.gnu.org
Subject: bug#29871: 25.3; ZWJ word-boundaries in regexps
Date: Sun, 29 Sep 2019 01:28:02 +0200	[thread overview]
Message-ID: <CADwFkmmgNWKsFUZ4ZrZ4aR=n9G0d4oEfBxYPWfdO51EgZPqUkA@mail.gmail.com> (raw)
In-Reply-To: <87k1x8f0qr.fsf@nagas.meson.org>

tags 29871 + notabug
close 29871
quit

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.

According to the above explananation, this behaviour is expected.  I'm
therefore closing this as notabug.

Best regards,
Stefan Kangas





      parent reply	other threads:[~2019-09-28 23:28 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
2019-09-28 23:28 ` Stefan Kangas [this message]

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='CADwFkmmgNWKsFUZ4ZrZ4aR=n9G0d4oEfBxYPWfdO51EgZPqUkA@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=29871@debbugs.gnu.org \
    --cc=eliz@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.