Issue Details (XML | Word | Printable)

Key: ODBC-104
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: bill lam
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
ODBC Driver

data truncation error when inserting utf8 characters

Created: 05/Jan/11 02:43 PM   Updated: 04/Jan/14 01:25 PM
Component/s: None
Affects Version/s: 2.0 Beta, 2.0 RC1, 2.0 RC2 , 2.0
Fix Version/s: 2.0.3

File Attachments: 1. File test.cpp (4 kB)

utf8 characterset

 Description  « Hide
Step to reproduce error:
1. create a new blank database with characterset=utf8
2. create a table with one varchar(9) column.
   actually 4x9=36 bytes will be automatically allocated by firebird.
3. insert one one column with 9 non-ascii utf8 (eg cyrillic
   or chinese) character such that bytecount greater than 9
4. expect a data truncation error.

(ATM I cannot test firebird allocate 3 or 4 bytes for each varchar character)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
bill lam added a comment - 05/Jan/11 02:49 PM
Again, please regard this test.cpp as pseudo code.
you need to create a blank utf8 database separately.
the SQLLEN strorlen parameter is used even for this
single row example because I actually insert multiple
rows in my real code, and this parameter is needed to
provide the length of field in each row.