Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Parsing MS SQL CSV export with Text::CSV_XS

by procura (Beadle)
on Oct 27, 2008 at 11:03 UTC ( #719722=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Parsing MS SQL CSV export with Text::CSV_XS
in thread Parsing MS SQL CSV export with Text::CSV_XS

You have an encoding problem

open my $fh, "<:encoding(utf16)", "file.csv";

See for prove:

$ od -t x1 xx.csv 0000000 ff fe 44 00 41 00 52 00 4b 00 0a 00 $ perl -we'open $a, "<:encoding(utf16)", "xx.csv" and print <$a>' | od + -t x1 0000000 44 41 52 4b 0a $


Comment on Re^3: Parsing MS SQL CSV export with Text::CSV_XS
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-12-26 00:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls