[spambayes-dev] modified version of sb_dbexpimp.py

Skip Montanaro skip at pobox.com
Wed Mar 17 12:58:05 EST 2004

    Kenny> I did notice one oddity in my exported csv file.  There were a
    Kenny> few tokens, most of them subject: something but a few others,
    Kenny> that were wrapped between two lines using an e-mail header style
    Kenny> wrapping where the continuation line begins with a tab.  Even
    Kenny> though the rest of the file is written with '\r\n' line
    Kenny> terminators, these wrapped lines have only a '\n' terminator.
    Kenny> This anomaly fooled my Vim editor into thinking the file was a
    Kenny> Unix file with '\n' line endings, so I wonder if the same thing
    Kenny> could throw off Excel in some cases.

The csv module handles multi-line fields and the authors went to great pains
to try and read/write Excel-compatible files.  I believe in Excel that an
embedded newline is just a newline, not CRLF.  If the files are throwing off
vim or Emacs that's not all that surprising.  How they interpret files with
mixes of CRLF and LF is anyone's guess.


More information about the spambayes-dev mailing list