Python 3.x stuffing utf-8 into SQLite db

Skip Montanaro skip.montanaro at gmail.com
Mon Feb 9 13:52:54 EST 2015


On Mon, Feb 9, 2015 at 11:54 AM, Matthew Ruffalo <mmr15 at case.edu> wrote:
> I think it's most likely that the encoding issues happened in the export
> from XLSX to CSV (unless the data is malformed in the original XLSX
> file, of course).

Aha! Lookee here... (my apologies to all you HTML mail haters - sometimes
it even comes in handy. :-)


This snapshot was taken against a running LibreOffice instance here at work
(on Linux). It would appear the fancy schmancy apostrophe was hosed up
before the data ever got to me. Had a guy here with Windows pop up the
original file I got in an actual Excel instance. Same bogosity.

Knowing that, I don't feel the least bit timid about just editing the darn
CSV file to correct the encode/decode/encode error before loading the data
into SQLite. I was worried that since I was doing some Python 3.x stuff
involving Unicode for the first time that I'd screwed something up.

Skip

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150209/5d3f4416/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stpat.png
Type: image/png
Size: 47543 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20150209/5d3f4416/attachment.png>


More information about the Python-list mailing list