in reply to Re: Text::CSV_XS and MySQL newline handling
in thread Text::CSV_XS and MySQL newline handling

It's not that simple. Text::CSV_XS will not parse the output the way MySQL generates it. It can't read the line with the escaped newline in it. That means I have to read the lines myself, dealing with possible embedded newlines, and feed them to $parser->parse().

The output part is also tricky because I would have to escape the newlines AFTER Text::CSV_XS generates the line. If I do it before, then it will escape my escape character when I call print() or combine().

  • Comment on Re^2: Text::CSV_XS and MySQL newline handling