You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to print a Unicode codepoint like 55296 can fail with multiple different failure modes, none of which are very helpful, and at least one of which (segfaullt) is a bug:
$ perl6 -e 'say 55296.chr'
Iteration past end of grapheme iterator
in method print at src/gen/m-CORE.setting:17885
in sub say at src/gen/m-CORE.setting:18644
in block <unit> at -e:1
$ perl6 -e 'say "A" ~ 55296.chr'
Error encoding UTF-8 string near grapheme position 0 with codepoint 65
in method print at src/gen/m-CORE.setting:17885
in sub say at src/gen/m-CORE.setting:18644
in block <unit> at -e:1
moritz: well, it could die with "Illegal codepoint"
moritz: or something like that
moritz: but everything else is either a bug, or an LTA error (which is also a bug, IMHO)
TimToady: m: say uniname(55296)
camelia: rakudo-moar 9210cc: OUTPUT«<Non Private Use High Surrogate>»
smls: Does that mean it should print "Invalid code point?" for that
TimToady: maybe more "No true codepoint would ever be a surrogate!"
$ perl6 -e 'say "A", 55296.chr'
AError encoding UTF-8 string near grapheme position 0 with codepoint 55296
in method print at src/gen/m-CORE.setting:17967
in sub say at src/gen/m-CORE.setting:18731
in block <unit> at -e:1
Patch: MoarVM/MoarVM@0acf845fcb
Testing it seems problematic because it would invalidate the TAP output.
Migrated from rt.perl.org#124185 (status was 'resolved')
Searchable as RT124185$
The text was updated successfully, but these errors were encountered: