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
ordering type other then UTF8 in a UTF8 DataBase [CORE3054] #3434
Comments
Commented by: @asfernandes I need reproducable test case, preferable using ISQL. |
Commented by: @pmakowski I can't reproduce SQL> create collation unicode_num for utf8 SQL> insert into "DruckJobs" ( "DrJob_AuftragDokID" , "DrJob_AusgabeArt" , "DrJob_AusgabeFileName" ) values ( 73 , 1 , 'DV_Auftragsbesttigung_73.pdf' ); |
Commented by: Sascha Michel (datiscum1) O.K. In your example it is 'DV_Auftragsbesttigung_73.pdf' in my it is 'DV_Auftragsbestätigung_73.pdf' |
Commented by: @asfernandes What is client/connection charset? |
Commented by: Sascha Michel (datiscum1) The charset is UTF8 ! |
Commented by: @asfernandes The string is probably not encoded in UTF-8, so it's really "malformed". If you don't think so, you should create a test case. |
Commented by: Sascha Michel (datiscum1) [0] L'D' 68U (0x0044) And when i change the Sort order not the Charset for the field all works fin :-) [16] L't' 116U (0x0074) I use C++ Builder 2009 and have no problem with UTF8 ! |
Commented by: @asfernandes This is not UTF-8 string. UTF-8 string has each non-ascii character represented by at least two bytes. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Won't Fix [ 2 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: Sascha Michel (datiscum1) UTF8String DokumentFileName ="DV_Auftragsbestätigung"; [0] 'D' 68 (0x44) O.K. this works ! :-( :-) thanks |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Sascha Michel (datiscum1)
create collation unicode_num for utf8
from unicode 'NUMERIC-SORT=1';
CREATE DOMAIN "FileName" AS
VARCHAR(80) CHARACTER SET UTF8
COLLATE UNICODE_NUM;
CREATE TABLE "DruckJobs" (
"DruckJob_ID" INTEGER,
"DrJob_AuftragDokID" INTEGER,
"DrJob_AusgabeArt" INTEGER NOT NULL,
"DrJob_AusgabeFileName" "FileName" COLLATE UNICODE_NUM
);
The following insert will work correctly with Firebird 2.5 Beta2
FIBDS_DruckJob->UpdateTransaction->ExecSQLImmediate( "insert into \"DruckJobs\" ( \"DrJob_AuftragDokID\" 2, \"DrJob_AusgabeArt\" , \"DrJob_AusgabeFileName\" ) values ( 73 , 1 , 'DV_Auftragsbestätigung_73.pdf' )");
But any prepared Statement insert will fail with the following error message:
Error Message:
----------------------------------------
Incompatible column/host variable data type.
Dynamic SQL Error.
SQL error code = -303.
Malformed string.
When i change the column "DrJob_AusgabeFileName" ordering type to "UTF8" all will work fine !!
Reagrs,
Sascha Michel
The text was updated successfully, but these errors were encountered: