SOAP gone wrong
2012-04-27 23:18:06.709319+02 by Dan Lyke 4 comments
2012-04-27 23:18:06.709319+02 by Dan Lyke 4 comments
[ related topics: Work, productivity and environment Furniture ]
comments in ascending chronological order (reverse):
#Comment Re: made: 2012-04-27 23:44:45.165588+02 by: meuon [edit history]
I'm having issues parsing 1999 version of Sybase SQL exported CSV, I thought I could just use Perl's: Text::CSV but that would be too easy, it's barfing on strings like:
1234,'M. "Meuon" Geek','N° 4 Coutoun, Apt 2',Benin,1024/2044
I either regex/replace/escape all the exceptions, or just manually parse the whole thing. It seems every time I try to use a library/toolset that is supposed to make such things easier, I get frustrated and build my own.
#Comment Re: made: 2012-04-28 03:59:08.553954+02 by: John Anderson
Meuon, I can get Text::CSV to parse that as long as as I include the 'allow_loose_escapes' option when calling the constructor, like so:
my $csv = Text::CSV->new({ binary => 1 , allow_loose_escapes => 1 });
Hopefully that helps you avoid re-inventing this particular wheel.
#Comment Re: made: 2012-04-28 05:33:06.141288+02 by: ebwolf
Is Null's first name Devon?
#Comment Re: made: 2012-04-28 16:00:11.635562+02 by: meuon
John, Thank you. That helped, I had loose quotes, but not loose escapes. The rest of the oddities I'm removing with regex's. 12+ years of sticking French W. African data into a database that didn't really support it well creates cruft. At least it's not from an old Oracle system,
We will not edit your comments. However, we may delete your comments, or cause them to be hidden behind another link, if we feel they detract from the conversation. Commercial plugs are fine, if they are relevant to the conversation, and if you don't try to pretend to be a consumer. Annoying endorsements will be deleted if you're lucky, if you're not a whole bunch of people smarter and more articulate than you will ridicule you, and we will leave such ridicule in place.
Flutterby™ is a trademark claimed by
Dan Lyke for the web publications at www.flutterby.com and www.flutterby.net.