Whether the author of perluniintro forgets to encode characters to bytes , or I am missing something. What do you think?
I don't think the author forgets something, but I'm not sure what you think the author forgets
Consider these three lines of output, do you see something wrong with them?
#!/usr/bin/perl -- use strict; use warnings; use Data::Dump; my $code_point = 0x3042;# HIRAGANA LETTER A aka 12354 my $unicode_string = pack('U*', $code_point); dd 12354 => pack('U*', 12354); dd "UNSIGNED CHARS(W*) ", pack "W*", unpack "U*", $unicode_string.$un +icode_string; dd "UNSIGNED OCTETS(C*) ", unpack "C*", $unicode_string.$unicode_strin +g; __END__ (12354, "\x{3042}") ("UNSIGNED CHARS(W*) ", "\x{3042}\x{3042}") ("UNSIGNED OCTETS(C*) ", 12354, 12354)
In reply to Re^3: Example of perluniintro
by Anonymous Monk
in thread Example of perluniintro
by remiah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |