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

Str.perl fails to escape certain lone diacritics at the start of the string. #6500

Open
p6rt opened this issue Sep 6, 2017 · 1 comment
Open
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 6, 2017

Migrated from rt.perl.org#132041 (status was 'new')

Searchable as RT132041$

@p6rt
Copy link
Author

p6rt commented Sep 6, 2017

From @smls

Some diacritical marks are correctly escaped by `.perl` when they appear
at the beginning of the string​:

  ➜ say "\c[COMBINING DIAERESIS]".perl; # "\x[308]"

  ➜ say "a" ~ "\c[COMBINING DIAERESIS]".perl.EVAL; # ä

But the following one is rendered as part of the opening quote's
grapheme, causing EVAL to not roundtrip​:

  ➜ say "\c[TELUGU VOWEL SIGN AA]".perl; # "ా"
  ➜ say "\c[TELUGU VOWEL SIGN AA]".perl.chars; # 2

  ➜ say "a" ~ "\c[TELUGU VOWEL SIGN AA]".perl.EVAL;
  ===SORRY!=== Error while compiling /home/[...]/EVAL_0
  Bogus statement
  at /home/[...]/EVAL_0​:1
  ------> <BOL>⏏"ా"
  expecting any of​:
  prefix
  term

Note that both of the marks demonstrated above are in the same Unicode
category​:

  ➜ say uniprops "\c[COMBINING DIAERESIS]";
  (Mn)

  ➜ say uniprops "\c[TELUGU VOWEL SIGN AA]";
  (Mn)

(This bug was found via the following SO answer​:
https://stackoverflow.com/a/46042910/1160124)


This is Rakudo version 2017.08-86-gbfee5a1ed built on MoarVM version
2017.08.1-128-gde6dceda
implementing Perl 6.c.

@p6rt p6rt added the uni label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant