On 10/05/2010 11:40 AM, Jeff Johnson wrote:
> It appears a user entered an unusual character in a data field. Here is
> the traceback:
>
> Traceback (most recent call last):
> File "dabo\ui\uiwx\dControlMixin.pyc", line 27, in _onWxHit
> File "dabo\ui\uiwx\dPemMixin.pyc", line 992, in raiseEvent
> File "dabo\lib\eventMixin.pyc", line 92, in raiseEvent
> File "c:\docume~1\jeff\locals~1\temp\tmpqjo6d6.py", line 227, in onHit
> self.Form.processSOC()
> File "c:\docume~1\jeff\locals~1\temp\tmpqjo6d6.py", line 209, in
> processSOC
> m = socutils.main()
> File "ui\socutils.pyc", line 194, in main
>
> File "ui\socutils.pyc", line 136, in outputCSV
>
> sqlite3.OperationalError: Could not decode to UTF-8 column 'socfname'
> with text 'Dorothé'
>
> I am parsing an email, so what is the best way to ignore these characters?
>
>
>
>
After opening the connection, issuing a:
conn.text_factory = str
does the trick.
Jeff
-------------------
Jeff Johnson
[email protected]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]