Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: One-line CSV Parser

by ww (Archbishop)
on Apr 04, 2008 at 16:01 UTC ( [id://678406]=note: print w/replies, xml ) Need Help??


in reply to One-line CSV Parser

From the cited RFC,

If double-quotes are used to enclose fields, then a double-quote appearing inside a field must be escaped by preceding it with another double quote. For example:

"aaa","b""bb","ccc"

and

...from the preceeding para of the RFC ( http://tools.ietf.org/html/rfc4180#section-2 ):

If fields are not enclosed with double quotes, then double quotes may not appear inside the fields.

Note, however that "as defined" may overstate the status of the document:

This memo provides information for the Internet community. It does not specify an Internet standard of any kind.
... While there are various specifications and implementations for the CSV format (cites removed), there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files. This section documents the format that seems to be followed by most implementations:

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2026-01-17 07:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (121 votes). Check out past polls.

    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.