in reply to Re: help neeed in unpack
in thread help neeed in unpack
i used U4 still its giving some sequence of numbers. i trien to x4 to null byte the four chinese characters its not working . i tried using A4 also its not working.use utf8; use Encode; open INPUT,"<:utf8","D:\\try_unicode\\input.txt" or die "Couldn't open + file: $!"; close STDOUT; open STDOUT ,">:utf8","D:\\try_unicode\\output.doc" or die "Couldn't o +pen file: $!"; $unpacking=<INPUT>; chomp($unpacking); print "\nunpacking1 :" ,decode("utf8",unpack("x4A4",$unpacking)),"\n +"; print "\nunpacking2 :" ,unpack("U4A4",$unpacking),"\n"; close INPUT; close STDOUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: help neeed in unpack
by wazoox (Prior) on Mar 14, 2006 at 15:20 UTC |