From: Kevin D. <da...@gm...> - 2005-05-27 16:33:44
|
There are two problems in test_unicode with regards to pysqlite2. pysqlite2 really seems to want UTF-8 encoding for strings and appears to do its own encoding and decoding. This is not a problem for me, because the stuff I'm doing is all UTF-8. pysqlite2 chokes on two parts of test_unicode. One of the columns in the test table has a dbEncoding of latin-1. When pysqlite2 tries to refetch the data from the database, it attempts to decode that latin-1 string via utf-8 to a unicode object. There does not appear to be any way to prevent this from happening. Because of this, the assert will also fail... the test is checking that the raw value coming out of the database is the UTF-8 encoded string... but pysqlite2 returns the decoded unicode object. Since everything *I'm* doing is utf-8, this doesn't bother me... I assume that there may be others out there with databases that have other encodings? If so, you might want to bring this up on the pysqlite list... Kevin |