0

I use MySqlBulkLoader to load files into the table. The issue I have is that this file could come from both Mac and Windows which means the LineTerminator could be \r\n or just \n. Is there a way to load both these with the same code .. meaning can we specify multiple LineTerminators for the same MySqlBulkLoader or is there a way to change the LineTerminators in the file if it is Mac to CR-LF and then do a bulk load ?

Any help would be appreciated.

wishy
  • 1,748
  • 2
  • 12
  • 14

1 Answers1

0

Found an answer. You can try to find the Line Terminator using the method in

How can I detect if a file has Unix line feeds (\n) or Windows line feeds (\r\n)?

and set the line terminator on the mysqlbulkloader accordingly.

Community
  • 1
  • 1
wishy
  • 1,748
  • 2
  • 12
  • 14