Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character set conversion errors in SQLGetData when reading BLOB SUB_TYPE 1 [ODBC180] #169

Closed
firebird-automations opened this issue Nov 3, 2014 · 5 comments

Comments

@firebird-automations
Copy link

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

@firebird-automations
Copy link
Author

Commented by: Jojakim Stahl (jstahl)

Uploaded patch resolving the issue.

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.

@firebird-automations
Copy link
Author

Modified by: Jojakim Stahl (jstahl)

Attachment: bug-180.patch [ 12610 ]

@firebird-automations
Copy link
Author

Commented by: @alexpotapchenko

Fixed in CVS

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.5 [ 10771 ]

Fix Version: 2.1 Beta [ 10410 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants