- or download this
#hex dump of A
#00000000 41 |A|
#00000001
- or download this
#hex dump of HIRAGANA LETTER A
#00000000 e3 81 82 |...|
#00000003
- or download this
#Example 1: native string may not be native string
#Code: $native_string=pack('W*', unpack('U*', $unicode_string));
...
Dump $unicode_string;
Dump $native_string; # ==> this is UTF8 flaged may be transparen
+tly upgraded because code point > 255
Dump $native_string2;
- or download this
#Example 2: it is not bytes, it is array of code point.
#Code: @bytes=unpack("C*", $unicode_string);
...
@bytes=map{ sprintf("%X",$_) } unpack("C*", Encode::encode('utf8',
+$unicode_string));
print join('|', @bytes), "\n";