Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delimiter pairing doesn't work with diacritics #5487

Closed
p6rt opened this issue Jul 26, 2016 · 3 comments
Closed

delimiter pairing doesn't work with diacritics #5487

p6rt opened this issue Jul 26, 2016 · 3 comments
Labels
LTA Less Than Awesome; typically an error message that could be better uni

Comments

@p6rt
Copy link

p6rt commented Jul 26, 2016

Migrated from rt.perl.org#128741 (status was 'resolved')

Searchable as RT128741$

@p6rt
Copy link
Author

p6rt commented Jul 26, 2016

From zefram@fysh.org

I'd expect the delimiter pairing to work on all "opening punctuation"
graphemes. Like this​:

/^<​:Ps>$/.ACCEPTS("[").Bool
True
"q[foo]".EVAL.perl
"foo"

But if the grapheme consists of a Ps base character plus a combining
diacritic, then it matches <​:Ps> (identifying it as an "opening
punctuation" grapheme), but it doesn't get paired with a corresponding
Pe delimiter​:

/^<​:Ps>$/.ACCEPTS("[\x[308]").Bool
True
"q[\x[308]foo]\x[308]".EVAL.perl
===SORRY!=== Error while compiling /home/zefram/usr/perl/pg/EVAL_5
Couldn't find terminator [? (corresponding [? was at line 1)
at /home/zefram/usr/perl/pg/EVAL_5​:1
------> q[?foo]?^<EOL>
  expecting any of​:
  [?

Not sure whether this is really a bug, but the mismatch between the <​:Ps>
regexp and the scope of delimiter pairing is at least less than awesome.

-zefram

@p6rt
Copy link
Author

p6rt commented Nov 8, 2017

From @samcv

I have made the error much more awesome​:

Starter [̈ is immediately followed by a combining codepoint. Please use [ without a combining glyph ([̈ was at line 1)

Should affect q quoting and s/// as well. Going to close this as resolved.

@p6rt
Copy link
Author

p6rt commented Nov 8, 2017

@samcv - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Nov 8, 2017
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better uni labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better uni
Projects
None yet
Development

No branches or pull requests

1 participant