You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading a charachter type BLOB as LONG(W)VARCHAR, no/wrong charset conversion is performed.
When char BLOB is bound to SQL_C_WCHAR, mbstowcs conversion cannot be applied to each chuck returned from the DB seperately, but must be done in advance for the complete BLOB. Imagine i.e. a 3-byte UTF8 sequence cut split over 2 chunks. Impossible to convert correctly, therefore need to convert all at once in advance.
The implementation could be enhanced further regarding memory usage by searching correct chucking points and garding unconverted left over bytes of the chunk for the next retrieval. but this would involve some additional logic in the conversion function which is not implemented yet. Therefore I left with fetching the complete BLOB and conversion in advance.
Submitted by: Jojakim Stahl (jstahl)
Attachments:
bug-180.patch
When reading a charachter type BLOB as LONG(W)VARCHAR, no/wrong charset conversion is performed.
When char BLOB is bound to SQL_C_WCHAR, mbstowcs conversion cannot be applied to each chuck returned from the DB seperately, but must be done in advance for the complete BLOB. Imagine i.e. a 3-byte UTF8 sequence cut split over 2 chunks. Impossible to convert correctly, therefore need to convert all at once in advance.
Commits: 9fca7df d94a113
The text was updated successfully, but these errors were encountered: