« Return to Thread: FasterCSV: preserving quoted strings

Re: FasterCSV: preserving quoted strings

by James Gray-7 :: Rate this Message:

Reply to Author | View in Thread

On Jul 9, 2009, at 5:59 AM, Marcus Mitchell wrote:

> Bil Kleb wrote:
>> On Feb 26, 2:08�pm, James Gray <ja...@...> wrote:
>>>
>>> Well, then you don't really want a CSV parser.
>>>
>>> Quotes in CSV data are used to indicate field grouping. �In other  
>>> �
>>> words, they are metadata about the content and it doesn't make  
>>> sense �
>>> for a parser to return those to you. �It's like how an XML parser  
>>> �
>>> wouldn't give you the equals sign used to set a tag attribute.
>>
>> Ah, OK.  That clears things up.
>>
>> Thanks,
>
> or use :force_quotes => true when FasterCSV.open or FasterCSV.new

That option causes FasterCSV to always quote fields on output.  Bil  
was asking if he could have the quotes left in his fields on input.

James Edward Gray II

 « Return to Thread: FasterCSV: preserving quoted strings