|
[
Permalink
| « Hide
]
Slava added a comment - 27/Feb/13 06:52 PM
I also ran into this problem. Today I played with driver code and wrote small fix, exactly like your evgeniy.
see fbcore, line 2075
elif vartype == SQL_VARYING: size = bytes_to_uint(sqlvar.sqldata[:1]) # ****************************** #value = ctypes.string_at(sqlvar.sqldata[2],2+size) ### Todo: verify handling of P version differences if PYTHON_MAJOR_VER == 3: value = bytes(sqlvar.sqldata[2:2 + size]) else: value = str(sqlvar.sqldata[2:2 + size]) if ((self.__charset or PYTHON_MAJOR_VER == 3) and sqlvar.sqlsubtype != 1): # non OCTETS value = b2u(value,self.__python_charset) replace selected string with size = bytes_to_uint(sqlvar.sqldata[:2]) |