Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^13: Text::CSV encoding parse()

by Tux (Canon)
on Aug 22, 2019 at 08:48 UTC ( #11104845=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat test.csv
    https://www.ibm.com/support/knowledgecenter/es/search/�Cuales s
    +on las partes de una cadena de conexi�n??scope=SSGU8G_12.1.0|h
    +ttps://www.ibm.com/support/knowledgecenter/es/SSGU8G_12.1.0/com.ibm.j
    +dbc_pg.doc/ids_jdbc_011.htm|0|1|1|0
    ...
    PV("1"\0)
    PV("1"\0)
    PV("1"\0)
    
  2. or download this
    $ perl -CEO -MEncode=decode -MData::Peek -MText::CSV_XS -wE'my$c=Text:
    +:CSV_XS->new({sep_char=>"|",auto_diag=>1,binary=>1});while(<>){$c->pa
    +rse(decode("utf-8",$_));DPeek for$c->fields}' test.csv
    PV("https://www.ibm.com/support/knowledgecenter/es/search/\357\277\275
    +Cuales son las partes de una cadena de conexi\357\277\275n??s"...\0) 
    +[UTF8 "https://www.ibm.com/support/knowledgecenter/es/search/\x{fffd}
    +Cuales son las partes de una cadena de conexi\x{fffd}n??scope=SSGU8G_
    +12.1.0"]
    ...
    PV("1"\0)
    PV("1"\0)
    PV("1"\0)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2021-04-23 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?