Open firebird-automations opened 13 years ago
Commented by: Petr Kristan (epospro)
Utf-8 example in czech language.
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.
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.
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) ;
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.