\r\n or \n notepad editor end line ???

ajikoe at gmail.com ajikoe at gmail.com
Wed Jun 8 16:53:14 CEST 2005


Hello All,

Thanks for the response.

I use mysql and find something strange lately while load text file to
my database table using LINES TERMINATED BY '\r\n',

And I found that mysql think I have '\r\r\n'. this is happened because
in one of my code I use 'w' to write element of string + '\r\n'. now I
understand why this happened.

Actually I prefer to use 'w' and 'r' because the termination of the
line will always '\n'.
By changing mycode to always use 'w' and write element of string +'\n'
instead of +'\r\n' and let my mysql code use LINES TERMINATED '\r\n' I
think solve this problem. :)

pujo




More information about the Python-list mailing list