Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

Re^2: help neeed in unpack

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 10: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.