Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for Uint8 / Uint16 Unicode string (#220)
* Fix truncated string when underlying database engine do not use Uint8 unicode data format. * Update for full unicode specification. Usage of field size is deleted, only data size remain to determine the length of data we need to read. This fix the bug that cause the driver to truncate string if the above two conditions are verified : - the underlying database engine use Uint16 in place of Uint8 for encoding unicode string. - the readed string size in greater than the half of the field size. Example for Uint16 encoding : - field size 10, string size 4 -> no bug - field size 10, string size 6 -> bug, only the firsts fives characters are returned According to MS Doc The function SQLDescribeCol, return among other things, the size in characters, not byte, of the field. the other ODBC functions used to retrieve data use length indicator in byte. (SQLBindCol, SQLFetchScroll) Another bug may be corrected when using Uint8 and many 3-bytes unicode characters. ! TO BE TESTED ! * Update test case for unicode char * Update for correct offset calculation * Delete test.jl Delete personal test file * add @inbound
- Loading branch information