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

chr() returns something that is not a string of characters, and say/print outputs it as bytes in Rakudo #2170

Closed
p6rt opened this issue Sep 16, 2010 · 6 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 16, 2010

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

Searchable as RT77888$

@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

From @masak

<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

@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

From @pmichaud

This appears to be caused by a Parrot FileHandle bug -- filed as TT #​1793.

Pm

@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

From @pmichaud

Now fixed in 760c734​:

  pmichaud@​plum​:~/rakudo$ ./perl6
  > 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

1 similar comment
@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

From @pmichaud

Now fixed in 760c734​:

  pmichaud@​plum​:~/rakudo$ ./perl6
  > 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

@p6rt
Copy link
Author

p6rt commented Sep 16, 2010

@pmichaud - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Sep 16, 2010
@p6rt p6rt added the Bug 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