Issue Details (XML | Word | Printable)

Key: PYFB-37
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Pavel Cisar
Reporter: Dan Casper
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird driver for Python

Unicode Strings incorrect not allowed for insertion into BLOB SubType 1.

Created: 20/Jun/13 06:17 PM   Updated: 25/Jun/14 09:38 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4

Environment: Windows 7, Firebird 2.5, Python 2.7, FDB 1.3.


 Description  « Hide
I have this domain defined:

CREATE DOMAIN txtparm AS BLOB SUB_TYPE 1 DEFAULT NULL;

And a table using it was raising this error:

Unicode strings are not acceptable input for a non-textual BLOB column.

From ! line 2851 in fbcore.py. The if statement requires an additional check that sqlvar.sqlsubtype != 1 before raising that error is reasonable. Is there a .git repository I can clone / pull from or likewise so I can submit changes? Or is notifying someone enough?

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Cisar added a comment - 21/Jun/13 07:27 AM
Well, actually, the situation is more complicated, as FDB is not intended to let unicode slip into any BLOB (except via streamed BLOB). For textual BLOBs, automatic conversion to connection charset (or locale.getpreferredencoding() if connection charset is not specified) is performed, for non-textual BLOBs you should get this error. So suggested change is not enough. Anyway, reported case is a bug. Fixed.