Hi all,
When a GRAPHIC type is retrieved, the result is almost always an empty
string. Which is because, of course, GRAPHIC is a double-byte char, and
something like "ABC" would be returned as
0x00 0x41 0x00 0x42 0x00 0x43
and when PyString_AsString() is called, it appears to it that the string
terminates right there in the first byte.
(I am talking about the case SQL_C_DBCHAR in _db2_module.c).
I hesitated to file a bug, because perhaps this problem goes away is
compiled with wide character support? But I haven't had any luck,
not that I know much about Python internals either.
Any thoughts?
-Greg
|