Skip Menu |
 
Report information
Id: 77888
Status: resolved
Priority: 0/
Queue: perl6

Owner: pmichaud <pmichaud [at] pobox.com>
Requestors: masak <cmasak [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [BUG] chr() returns something that is not a string of characters, and say/print outputs it as bytes in Rakudo
Date: Thu, 16 Sep 2010 08:15:27 +0200
To: rakudobug [...] perl.org
From: Carl Mäsak <cmasak [...] gmail.com>
Download (untitled) / with headers
text/plain 441b
<masak> perl6: say chr(194), chr(177) <p6eval> rakudo 358d72: OUTPUT«±␤» <p6eval> ..pugs: OUTPUT«Â±␤» <masak> I'm with pugs on this one. <TimToady> I'm with masak on this one. * masak submits rakudobug on this one <masak> perl6: print .chr for <233 186 166 233 171 152> <p6eval> rakudo 358d72: OUTPUT«麦高» <p6eval> ..pugs: OUTPUT«éº¦é«˜» <masak> clearly rakudo is thinking in bytes, not characters. <TimToady> indeed
This appears to be caused by a Parrot FileHandle bug -- filed as TT #1793. Pm
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 496b
Now fixed in 760c734: pmichaud@plum:~/rakudo$ ./perl6 Show quoted text
> print .chr for <233 186 166 233 171 152>;
麦é«> The TT #1793 ticket turned out to be a non-bug; the problem was in Rakudo's setup of $*IN, $*OUT, and $*ERR. I'm not sure how the current test suite would be able to test this particular bug (since it's in the standard output filehandle), so I'm going to go ahead and mark the ticket as resolved. (If someone has a good way of testing this, it would be welcome.) Thanks! Pm


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org