From: thomas.macklin@... Date: 2007-08-17T00:44:58+09:00 Subject: Re: Double quote escape character On Aug 16, 11:26 am, Alvaro Perez wrote: > Hi all, > > I'm trying to export a string to a excel file using fastercsv and I > wanted it double quote to make it safer. So i tried to use the escape > character \" to insert double quotes but it doesn't work: > > - string produces string with no quotes in the file > > - "\"" << string << "\"" produces """string""" > > - "\"" + string + "\"" produces """string""" > > I have no idea on how to solve this. > > Thanks for the help, > Alvaro. > -- > Posted viahttp://www.ruby-forum.com/. try this: irb > str = "foo" > str2 = %Q{#{str}} > p str2 I think that's what you're looking for.