Thread Behavior unpack/pack in v5.10 with U-template (3 answers)
Opened by rosti at 2011-08-20 16:35

rosti
 2011-08-20 16:35
#151717 #151717
User since
2011-03-19
3195 Artikel
BenutzerIn
[Homepage]
user image
Hi,

heute raus, ich bin gespannt ;)

Ticket: https://rt.perl.org/rt3/Ticket/Display.html?id=974...

Quote
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

View full thread Behavior unpack/pack in v5.10 with U-template