Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: help needed in utf16

by SamCG (Hermit)
on Mar 27, 2006 at 18:55 UTC ( [id://539502]=note: print w/replies, xml ) Need Help??


in reply to help needed in utf16



I've successfully used:
open FH, $file_name or die "could not open $file_name: $!\n"; binmode FH, ":encoding(UTF-16)";
though I'd also point out that it's not recommended to use bare filehandles anymore. However, I'm not sure if not using the binmode function is actually your problem, since you don't describe your error. What I saw before using the binmode was the file would appear broken -- instead of "this\tis\tthe\file" (in a tab-delimited file), I'd see "t h i s i s t h e f i l e" (or something close to that).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found