Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: help neeed in unpack

by uva (Sexton)
on Mar 14, 2006 at 12:33 UTC ( [id://536551]=note: print w/replies, xml ) Need Help??


in reply to Re: help neeed in unpack
in thread help neeed in unpack

i tried the following code.but still problem
the input.txt contains 4 chinese characters in a line.
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;
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.

Replies are listed 'Best First'.
Re^3: help neeed in unpack
by wazoox (Prior) on Mar 14, 2006 at 15:20 UTC
    I don't understand what you're trying to do with "unpack" here.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://536551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2025-01-21 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (61 votes). Check out past polls.