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
Lost the supplementary characters(UTF-8 4byte) at immediate API handling. [CORE2395] #2815
Comments
Modified by: Minoru Yoshida (timeful2)Attachment: test.sql [ 11430 ] |
Modified by: Minoru Yoshida (timeful2)Attachment: TEST.fbk [ 11431 ] |
Commented by: @asfernandes Are you really sure V2.0.5 has a problem? Note: you mixed equal (=) and like (%) in your test case: Where N = '%��%' Obviously, this will not work in any version. |
Modified by: Minoru Yoshida (timeful2)Attachment: test.sql [ 11432 ] |
Commented by: Minoru Yoshida (timeful2) >Note: you mixed equal (=) and like (%) in your test case: Where N = '%��%' Sorry, please change to the following correct statements. >Select * from TEST Where N = '%��%'; /* Select 4-Byte UTF-8*/ Select * from TEST Where N = '��'; /* Select equal 4-Byte UTF-8*/ >Obviously, this will not work in any version. What is this mean? -- Select all : Equal: Like: -- Select all :
============ ====== Equal: Like: |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.0.6 [ 10303 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: Minoru Yoshida (timeful2)
Attachments:
test.sql
TEST.fbk
test.sql
On V2.0.5 with UTF8 client connection,
Lost the supplementary characters(UTF-8 4byte) at immediate API handling.
e.g. U+20BB7 is UTF-8 4byte character(0xF0A0AEB7)
http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=20bb7
Not immediate API(Using parameter) handling is working fine.
e.g. In Delphi,
...
Query1.SQL.text := 'Insert into TEST(K, N) Values(5,:P1)';
Query1.ParambyName('P1').Asstring := '��';/* 4-Byte UTF-8 0xF0A0AEB7 */
Query1.Execute;
...
The NONE client connection that handling is worked,
and V2.1.2RC all works fine.
Reproduce:
//Please see attachment file.
1. Copy TEST.fdb database to c:\temp folder.
2. Run isql.exe
3. > input test.sql;
4. Open out.txt
Lost the 4-Byte UTF-8 characters...
============ ======
1 A
2 ±
3 あ
4
5
-- test.sql(UTF-8 format text)
Set Names UTF8;
Set SQL Dialect 3;
Connect 'c:\temp\TEST.fdb' user 'sysdba' password 'masterkey';
Shell del out.txt;
Output out.txt;
/*Create table*/
Drop table TEST;
Create Table TEST(K INTEGER Not Null, N VARCHAR(1)
, Constraint PK Primary Key (K));
Insert into TEST(K, N) Values(1,'A'); /* 1-Byte UTF-8 0x41 */
Insert into TEST(K, N) Values(2,'±'); /* 2-Byte UTF-8 0xC2B1 */
Insert into TEST(K, N) Values(3,'あ'); /* 3-Byte UTF-8 0xE38182 */
Insert Into TEST(K, N) Values(4,'��'); /* 4-Byte UTF-8 0xF0A0AEB7 */
Insert into TEST(K, N) Values(5,'��'); /* 4-Byte UTF-8 0xF0A0AE9F */
Commit;
Select * from TEST; /* Select all */
Select * from TEST Where N = '%��%'; /* Select 4-Byte UTF-8*/
Commit;
Commits: 3024e8a
The text was updated successfully, but these errors were encountered: