ISQL pads UTF-8 data incorrectly [CORE3431] #3793
Labels
affect-version: 1.5.6
affect-version: 2.0.4
affect-version: 2.0.5
affect-version: 2.0.6
affect-version: 2.0.7
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.1.4
affect-version: 2.1.5
affect-version: 2.5.0
affect-version: 2.5.1
affect-version: 3.0 Beta 1
affect-version: 3.0 Initial
affect-version: 3.0 RC2
component: isql
fix-version: 3.0 Alpha 1
priority: major
qa: done successfully
type: bug
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
The text was updated successfully, but these errors were encountered: