Steffen G. wrote:

I have a problem with text containing newline characters when using DBI:CSV.
I put in a string containing a newline and I get back a string containing
"\n".

What am I doing wrong?

Nothing.  It's a bug.

As this problem is similar to a bug I've found few months ago, which Jeff
could fix by adding a line in SQL::Parser (thanks again)

Steffen, could you resend me that previous fix, I've had some mail storage disasters and I want to make sure I have that.

, I looked for a
similar solution, and indeed, adding these lines...

 @$fields = map { s/([^\\])\\r/$1\r/g; $_ } @$fields;
 @$fields = map { s/([^\\])\\n/$1\n/g; $_ } @$fields;

... in SQL::Parser, line 1748, will work for the example above.

But as it will fail when having a string like "\\\n", its just a dirty
workaround...

As I'm working out the final bugs on a major new release of S::S and S::P, I'm going to go for your workaround for now and revisit it later. Of course, using placeholders instead of quote() hops around the entire problem, but still it needs to be fixed. Thanks much!

--
Jeff



Reply via email to