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

data truncation error when inserting utf8 characters [ODBC104] #101

Closed
firebird-automations opened this issue Jan 5, 2011 · 3 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: bill lam (b.lam)

Attachments:
test.cpp

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)

@firebird-automations
Copy link
Author

Commented by: bill lam (b.lam)

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.

@firebird-automations
Copy link
Author

Modified by: bill lam (b.lam)

Attachment: test.cpp [ 11861 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Closed [ 6 ]

resolution: Won't Fix [ 2 ]

Fix Version: 2.0.3 [ 10581 ]

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