ncvo / charity-commission-extract

Python utilities for handling the import of data from the Charity Commission data extract
43 stars 21 forks source link

Remove nul chars, escape quotes as per RFC4180, remove final empty line #10

Open therainingmonkey opened 4 years ago

therainingmonkey commented 4 years ago

Similar to PR9, this tweaks bcp.py to remove NUL characters, properly escape quote characters ( " ) and thus avoid commas within fields being interpreted as delimiters.

Differs from PR9 in that it doesn't convert double-quote characters into single-quote characters; instead it keeps them as double-quotes correctly escaped as per RFC 4190.