|
Thanks for your comment.
>May be these columns contains only english characters? No. Testing charsets are japanese value in VARCHAR/CHAR of UTF8 . I think that transliteration is dependent on ADO. AFAIK, ADO connection is translated to UCS-2(UTF-16?) from UTF-8 . I try another case, - FB V2.0 default charset : SJIS_0208 - Client connection : UTF8 The BLOB column's transliteration is fine. I think that ODBC driver side problem.... I am using Delphi 2009 with ADOConnection.
My configure: Delphi 2009, Win XP sp2, Fb 2.1, build 144. My database's default character is UTF8. When it load the data from the database by FbODBC, varchar can return Chinese correct, but Blob field is not. I find out is that if I make the TADOQuery memo field from TMemoField to TWideMemoField, then the Chinese character dispaly correctly. Because I don't have build 143, I don't whether the bug is introudce from 144, maybe someone can send me a odbcfb32.dll build 143 for testing. I retry it with RC1(Build 148 ) .
My environment: - FB V2.0.4 - Client connection:UTF8 Case 1. Defaut charset :UTF8 - VARCHAR is fine - BLOB text is NOT fine. Case 2. Default charset:SJIS_0208 - VARCHAR is fine - BLOB text is fine. (Of cause, characters range is SJIS_0208 only) I think that result must be the same at client connection is UTF8. Why is a result different? I have understood with this problem.
This is a bug of Firebird 2.0. If ODS < 11.1 then BLOB charset <> attachment charset. You can try Firebird 2.1.1 (backup/restore of the database is required) and you will see an identical behaviour in both cases. ADO does not translate BLOB fields always. You must use an attachment charset = a data charset. Do you confirm it? ODBC driver is only an intermediate layer between a server and a client application (ADO in this case). The driver transfers data to a client application in the form which a server returns their.
I am usually using IBObject on FB2.0.4. The UTF8 BLOB column handling is no ploblem(This mean is *no* transliteration at any charset connection).
Then, i try IBProvidor with UTF8 ADODB.connection . That works fine now. IBProvider Free Edition 32 bit http://www.ibprovider.com/eng/download.html >This is a bug of Firebird 2.0. invalid BLOB ID on blob with different charset Affects Version/s:2.1.1 http://tracker.firebirdsql.org/browse/CORE-2086 Is your saying this? My case is same(Defaut =Connection) charset. >- FB V2.0.4 >- Client connection:UTF8 >Case 1. Defaut charset :UTF8 >- VARCHAR is fine >- BLOB text is NOT fine. invalid BLOB ID on blob with different charset
Affects Version/s:2.1.1 http://tracker.firebirdsql.org/browse/CORE-2086 - No This - http://tracker.firebirdsql.org/browse/CORE-1277 In Firebird 2.0 the server does not translate BLOB fields into a client charset i.e. BLOB charset on the client side = Default database charset. It explains your Case 1 and Case 2. >It explains your Case 1 and Case 2.
Thanks for your explanation. i have understood. >You can try Firebird 2.1.1 (backup/restore of the database is required) and you will see an identical behaviour in both cases. I retry it on V2.1.1( and V2.5 Alpha). My environment: - FB V2.1.1 - Client connection:UTF8 Case 1. Defaut charset :UTF8 - VARCHAR is fine - BLOB text is NOT fine. Result is the same built 145. it seems converted from ansi(CP932), Case 2. Default charset:SJIS_0208 - Result recordset is empty .( and V2.5 result is the same, too) My another application works fine in both cases(Using IBO). I have not clear understanding... Result recordset is empty? What is It meaning?
Sorry, i had mistake. This case is another case.
>My environment: >- FB V2.1.1 Case 1. Defaut charset :UTF8 Client connection:UTF8 >- VARCHAR is fine >- BLOB text is NOT fine. Result is the same built 145. it seems converted from ansi(CP932), Case 2. Default charset:SJIS_0208 Client connection:UTF8 >- VARCHAR is fine >- BLOB text is fine. >(Of cause, characters range is SJIS_0208 only) >Result recordset is empty? What is It meaning? This mean is recordSet.EOF as bellow case 3. My test code: > While (Not recordSet.EOF) And row < 60000 Case 3. Defaut charset :UTF8 Client connection:SJIS_0208 - Result recordset is empty .( and V2.5 result is the same, too) As far as i know , This case issue an arithmetic error from server. because my data have the over SJIS_0208 range charset. Is this specification of ODBC driver? I have absolutely got confused in your non-reproducible cases at me.
1) You must use Firebird 2.1 2) Database ODS must be > = 11.1 (if database was created in Firebird 1.5 or 2.0 then backup/restore is required) Please use for testing FrameRobin or IBExpert too. If the result in these applications is differed from result in ODBC then inform me how I can reproduce it. And also I think your troubles are not related with ODBC driver. >1) You must use Firebird 2.1
>- FB V2.1.1 >2) Database ODS must be > = 11.1 (if database was created in Firebird 1.5 or 2.0 then backup/restore is required) Yes. >Case 3. Defaut charset :UTF8 Client connection:SJIS_0208 >- Result recordset is empty .( and V2.5 result is the same, too) Excel version:11.0 build 5612. I try it with IBProvidor. I get -214217837(80049e53) automation error. But ,This case will be not use case for me. It was reported only. My ploblem is this case only. >Case 1. Defaut charset :UTF8 Client connection:UTF8 >- VARCHAR is fine >- BLOB text is NOT fine. Result is the same built 145. it seems converted from ansi(CP932), Thanks for your kindly anser. I have told that ADO does not translate BLOB fields anyway.
Case 2. Default charset:SJIS_0208 Client connection:UTF8 - VARCHAR is fine - BLOB text is fine. Can you reproduce it with fb2.1, odc 11.1 and ODBC driver? If yes, then please give me example of your database. >Can you reproduce it with fb2.1, odc 11.1 and ODBC driver?
I retry it now on FB2.1. >Case 2. Default charset:SJIS_0208 Client connection:UTF8 - BLOB text is NOT fine. (Same the default charset is UTF8 ) Your saying is correct, i was mistaken about the IBProvidor's result. |
|||||||||||||||||||||||||||||||||||||||||||||||||
If UTF8 connection than the client receives BLOB content in UTF8 encoding and the client must decode it. This is true with VARCHAR/CHAR columns too. If CP943C connection than the client receives content in CP943C encoding (server converts fields content to CP943C).
I don't understand why VARCHAR/CHAR columns are working fine (are displaying fine) with UTF8 connection in your case. May be these columns contains only english characters?