> On 09 Jan 2016, at 10:33, (via RT) <perl6-bugs-follo...@perl.org> wrote: > > # New Ticket Created by > # Please include the string: [perl #127220] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=127220 > > > > jgoff@Demeisen:~$ perl6 -v > This is Rakudo version 2015.12-152-gd7f3f0b built on MoarVM version > 2015.12-29-g8079ca5 > implementing Perl 6.c. > > The following is a simple script that changes newlines to their control > picture equivalent, or at least it should: > > --cut here-- > my $str = "foo\nbar"; > $str ~~ s:g/\n/\c[2424]/; > say $str; > --cut here-- > > And here's the output: > > --cut here-- > jgoff@Demeisen:~$ perl6 -I. bug.txt | hexdump -C > 00000000 66 6f 6f e0 a5 b8 62 61 72 0a |foo...bar.| > 0000000a > --cut here-- > > The s/// statement turns newlines into E0 A5 B8, which is U+0978 > DEVANAGARI LETTER MARWARI DDA and not E2 90 A4, which is U+2424 SYMBOL > FOR NEWLINE. The 0A at the end of the string is unaffected, as it should > be.
\c[] interpretes codepoint values in decimal, not hexadecimal. If you use the correct decimal value: $ 6 'say "\x2424".ord’ 9252 you get: $ 6 'my $a = "aa\nbb"; $a ~~ s:g/\n/\c[9252]/; say $a' aabb In my opinion, ENOTABUG and can therefore can be closed.