Skip to content
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

ISQL pads UTF-8 data incorrectly [CORE3431] #3793

Closed
firebird-issue-importer opened this issue Apr 6, 2011 · 8 comments
Closed

ISQL pads UTF-8 data incorrectly [CORE3431] #3793

firebird-issue-importer opened this issue Apr 6, 2011 · 8 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Apr 6, 2011

Submitted by: @asfernandes

Is related to QA565

Attachments:
bug.png
correct.png

This issue is more noticeable in Linux, which generally uses terminal configured to UTF-8.

But it exists for all OSes, and it's not specific to console, but to any file the data is output.

ISQL pads UTF-8 data and separators as each UTF-8 byte being a character.

Attached is two images, with bug and correct behavior.

This issue exists for any multibyte character set, but I'm fixing it in ISQL for UNICODE_FSS and UTF8.

Test case
--------------------
create or alter procedure p1 returns (
c1 char(5) character set utf8,
c2 char(10) character set utf8,
vc1 varchar(5) character set utf8,
vc2 varchar(10) character set utf8
)
as
begin
vc1 = '12345';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = 'áé';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '123';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '12345';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '1234';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = 'áéíóú';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;
end!
select * from p1!
--------------------

Commits: aec3fb1 a566f5d FirebirdSQL/fbt-repository@55e6f23

====== Test Details ======

Padding in WI-T3.0.0.31767 looks OK: checked output on NotePad++ 6.6.9

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 6, 2011

Modified by: @asfernandes

Attachment: bug.png [ 11939 ]

Attachment: correct.png [ 11940 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 6, 2011

Modified by: @asfernandes

description: This issue is more noticeable in Linux, which generally uses terminal configured to UTF-8.

But it exists for all OSes, and it's not specific to console, but to any file the data is output.

ISQL pads UTF-8 data and separators as each UTF-8 byte being a character.

Attached is two images, with bug and correct behavior.

This issue exists for any multibyte character set, but I'm fixing it in ISQL for UNICODE_FSS and UTF8.

=>

This issue is more noticeable in Linux, which generally uses terminal configured to UTF-8.

But it exists for all OSes, and it's not specific to console, but to any file the data is output.

ISQL pads UTF-8 data and separators as each UTF-8 byte being a character.

Attached is two images, with bug and correct behavior.

This issue exists for any multibyte character set, but I'm fixing it in ISQL for UNICODE_FSS and UTF8.

Test case
--------------------
create or alter procedure p1 returns (
c1 char(5) character set utf8,
c2 char(10) character set utf8,
vc1 varchar(5) character set utf8,
vc2 varchar(10) character set utf8
)
as
begin
vc1 = '12345';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = 'áé';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '123';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '12345';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = '1234';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;

vc1 = 'áéíóú';
c1 = vc1;
c2 = vc1;
vc2 = vc1;
suspend;
end!
select * from p1!
--------------------

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 6, 2011

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 3, 2013

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 29, 2014

Modified by: @pcisar

Link: This issue is related to QA565 [ QA565 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 28, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

Test Details: Padding in WI-T3.0.0.31767 looks OK: checked output on NotePad++ 6.6.9

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 23, 2015

Commented by: @pcisar

Test created.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 23, 2015

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment