FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.23k stars 213 forks source link

Cannot transliterate blobs utf-8 and multiple call isc_put_segment [CORE3350] #3716

Open firebird-automations opened 13 years ago

firebird-automations commented 13 years ago

Submitted by: Petr Kristan (epospro)

Attachments: a

Database: ODS = 11.1 Default Character set: WIN1250

Table column: BLOB segment 80, subtype TEXT Nullable Client charset: UTF-8

I'am writing utf-8 text blob (in attached file) size 2172B by 3 calls: isc_put_segment(status, &to_blob, 1024, buffer) isc_put_segment(status, &to_blob, 1024, buffer) isc_put_segment(status, &to_blob, 124, buffer)

When blob_id is updated into table i get error: "Cannot transliterate character between character sets".

If the blob is puted by single large buffer: isc_put_segment(status, &to_blob, 2172, buffer) everythink is ok.

firebird-automations commented 13 years ago

Commented by: Petr Kristan (epospro)

Utf-8 example in czech language.

firebird-automations commented 13 years ago
Modified by: Petr Kristan (epospro) Attachment: a \[ 11907 \]
firebird-automations commented 13 years ago

Commented by: @ibprovider

CORE2122

?

firebird-automations commented 13 years ago

Commented by: Petr Kristan (epospro)

I use UTF-8 client charset, not UNICODE_FSS and inserted text is utf-8 valid. But your problem may have the same base.

firebird-automations commented 13 years ago

Commented by: @ibprovider

>I use UTF-8 client charset, not UNICODE_FSS and inserted text is utf-8 valid.

And what?

This is common (old) issue with transliteration of BLOB data between different charsets.

Was resolved in FB2.5.

firebird-automations commented 13 years ago

Commented by: Petr Kristan (epospro)

I have done some aditional tests. If I shrinked buffer to 1 byte, then is not possible to insert any multibyte encoded utf-8 code point!

//Not compilable example buffer='á'; //U+00E1 utf-8:c3 a1 isc_put_segment(status, &to_blob, 1, buffer) ; isc_put_segment(status, &to_blob, 1, buffer+1) ;