#79 Unicode errors with dialect = 1 database

open
nobody
5
2012-08-28
2012-08-28
No

Environment:
- system: Windows 7 64
- FirebirdSQL 2.5.1.26351_1_x64 SuperServer
- Python 2.7.3 from python.org
- kinterbasdb 3.3.0 final binary

I have database with encoding set to NONE where stored string data are encoded in WIN1250 codepage.
Passing parameters to cursor class execute() method:
- raises unicode error if passed parameter is a unicode string, e.g. u"SANDAŁ"
kinterbasdb.InterfaceError: (0L, "Error while attempting to convert object of type <type 'unicode'> to str for storage in field [name not known at this stage of query execution]. The invalid input object is: u'%SANDA\\u0141%'")
or
- if parameter is a string encoded with proper encoding, e.g. u"SANDAŁ".encode("cp1250"), no exception is raised, but no result is returned from fetch method, it looks like there were no matches, what isn't true.
Changing connection charset does nothing.
My question is, did I miss something important or it's a bug?

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks