Ok, I found a solution for the problem: latin1_decoder = lambda s: unicode(s, "latin1", "replace") sqliteconnection._connection.text_factory = latin1_decoder
Perhaps this should be set when you set the Encoding property for an sqlite db? -Simen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simen Haugen Sent: 17. august 2006 10:13 To: Dabo Users list Subject: RE: [dabo-users] Problems with sqlite > The default encoding for Dabo is utf-8. You can change this most easily in > > your bizobj.Encoding property: set it to "latin-1". I'm not using a bizobj to run the query. I use connection.getDaboCursor(), and set the encoding to "latin-1" before running the query. I still get this error. The error is captured in an empty except block, so the exception doesn't show either (but no dataset is returned even if it should). Running the query in sqlite3.exe is working fine. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul McNett Sent: 17. august 2006 01:09 To: Dabo Users list Subject: Re: [dabo-users] Problems with sqlite ----- Original Message ----- From: Simen Haugen [mailto:[EMAIL PROTECTED] To: Dabo Users list [mailto:[EMAIL PROTECTED] Sent: Wed, 16 Aug 2006 05:19:53 -0700 Subject: [dabo-users] Problems with sqlite > Hi. > > I get the following error in fetchall() (using sqlite): > OperationalError: Could not decode to UTF-8 column <unknown column name> > with text Linköping > This happens in dCursorMixin.py:199 > > My cursor has Encoding = "latin-1" > > If I run queries in sqlite the queries work (but the fields doesn't show up > with decoded characters, so "Linköping" is "Link÷ping"). > > This puzzles me, because one of the tables (that is contructed using two > others with these fields) works fine. I can select this field without > getting the error... The default encoding for Dabo is utf-8. You can change this most easily in your bizobj.Encoding property: set it to "latin-1". _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
