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

Behavior unpack/pack in v5.10 with U-template #11585

Closed
p5pRT opened this issue Aug 20, 2011 · 5 comments
Closed

Behavior unpack/pack in v5.10 with U-template #11585

p5pRT opened this issue Aug 20, 2011 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 20, 2011

Migrated from rt.perl.org#97418 (status was 'rejected')

Searchable as RT97418$

@p5pRT
Copy link
Author

p5pRT commented Aug 20, 2011

From nmqrstx-18@yahoo.de

Subject​: Behavior unpack/pack in v5.10 with U-template

hi,

from v5.6.1 to v5.8.8, I get the list of codepoints as follow​:

@​codepoints = unpack("U*", $bytes); # where $bytes is an utf-8-coded string
# or as recommended
@​codepoints = unpack("U0U*", $bytes);

Now, I have Perl as v5.10 and the result of unpack("U0U*", $bytes); is a
list of byteorder​:

my @​b = unpack "C*", 'ä'; # 195 164
my @​b = unpack "U*", 'ä'; # 195 164, same as above!

as not expected! It is a bug or a feature?

Kind regards,
Rolf Rost

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2011

From @cpansprout

On Sat Aug 20 07​:21​:13 2011, nmqrstx-18@​yahoo.de wrote​:

Subject​: Behavior unpack/pack in v5.10 with U-template

hi,

from v5.6.1 to v5.8.8, I get the list of codepoints as follow​:

@​codepoints = unpack("U*", $bytes); # where $bytes is an utf-8-coded
string
# or as recommended
@​codepoints = unpack("U0U*", $bytes);

Now, I have Perl as v5.10 and the result of unpack("U0U*", $bytes); is a
list of byteorder​:

my @​b = unpack "C*", '�'; # 195 164
my @​b = unpack "U*", '�'; # 195 164, same as above!

as not expected! It is a bug or a feature?

I’m no expert on pack, but I know it did change intentionally in 5.10.0.
Does this explain what you are seeing?

https://github.com/mirrors/perl/blob/v5.10.0/pod/perl5100delta.pod#Packing_and_UTF-8_strings

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2011

From [Unknown Contact. See original ticket]

On Sat Aug 20 07​:21​:13 2011, nmqrstx-18@​yahoo.de wrote​:

Subject​: Behavior unpack/pack in v5.10 with U-template

hi,

from v5.6.1 to v5.8.8, I get the list of codepoints as follow​:

@​codepoints = unpack("U*", $bytes); # where $bytes is an utf-8-coded
string
# or as recommended
@​codepoints = unpack("U0U*", $bytes);

Now, I have Perl as v5.10 and the result of unpack("U0U*", $bytes); is a
list of byteorder​:

my @​b = unpack "C*", '�'; # 195 164
my @​b = unpack "U*", '�'; # 195 164, same as above!

as not expected! It is a bug or a feature?

I’m no expert on pack, but I know it did change intentionally in 5.10.0.
Does this explain what you are seeing?

https://github.com/mirrors/perl/blob/v5.10.0/pod/perl5100delta.pod#Packing_and_UTF-8_strings

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2011

@cpansprout - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 26, 2011

@cpansprout - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant