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

Regression: National characters (e.g. umlauts) are NOT displayed correctly in 2.5.2 vs 2.5.1 in ISQL [CORE3976] #4309

Open
firebird-automations opened this issue Nov 9, 2012 · 15 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Attachments:
win1252_umlaut_test.zip
umlaut_displaying_problem_in_fb_252.zip

It is impossible to properly display in isql output from table that contains data with umlauts.
This effect is absent in official release FB 2.5.1 (03-oct-2011).

See test in attach: unzip, then run:
cmd /u
isql
in aaaa;

(in 2.5.1 the string will be displayed CORRECT, in 2.5.2 the umlaut will be replaced with '?')
-------------
Output in 2.5.1:

SQL> in aaaa;
<national message here>: 1252
Database: ch1252
ISQL Version: WI-V2.5.1.26351 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.1.26351 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.1.26351 Firebird 2.5/X
Net (TLPRG)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.1.26351 Firebird 2.
5/XNet (TLPRG)/P12"
on disk structure version 11.2

A

Tipps für Sie

Output in 2.5.2:

C:\1INSTALL\FIREBIRD\FB_25\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> in aaaa;
Текущая кодовая страница: 1252
Database: ch1252
ISQL Version: WI-V2.5.3.26551 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.3.26551 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.3.26551 Firebird 2.5/X
Net (TLPRG)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26551 Firebird 2.
5/XNet (TLPRG)/P12"
on disk structure version 11.2

A

Tipps f?r Sie

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: win1252_umlaut_test.zip [ 12250 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

PS.
it seems that the problem inside isql rather than engine.

1) if connect to 2.5.2 using isql of 2.5.1 than umlaut displays OK:

C:\1INSTALL\FIREBIRD\FB_25\bin>C:\1INSTALL\FIREBIRD\FB25_RLS\bin\isql.exe
Use CONNECT or CREATE DATABASE to specify a database
SQL> in aaaa;
<national message here>: 1252
Database: ch1252
ISQL Version: WI-V2.5.1.26351 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.3.26551 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.3.26551 Firebird 2.5/X
Net (TLPRG)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.1.26351 Firebird 2.
5/XNet (TLPRG)/P12"
on disk structure version 11.2

A

Tipps für Sie

2) if connect to 2.5.1 using isql of 2.5.2 than umlauts IS REPLACED with '?':

C:\1INSTALL\FIREBIRD\FB25_RLS\bin>C:\1INSTALL\FIREBIRD\FB_25\bin\isql.exe
Use CONNECT or CREATE DATABASE to specify a database
SQL> in aaaa;
<national message here>: 1252
Database: ch1252
ISQL Version: WI-V2.5.3.26551 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.1.26351 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.1.26351 Firebird 2.5/X
Net (TLPRG)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26551 Firebird 2.
5/XNet (TLPRG)/P12"
on disk structure version 11.2

A

Tipps f?r Sie

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Component: ISQL [ 10003 ]

summary: National characters (e.g. umlauts) are NOT displayed correctly in 2.5.2 vs 2.5.1 => Regression: National characters (e.g. umlauts) are NOT displayed correctly in 2.5.2 vs 2.5.1 in ISQL

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I tried with 2.5.2 client againt 3.0 and 2.5.2 remote server, and cannot reproduce.

Does the problem happens to you when using a remote server or localhost: ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> Does the problem happens to you when using a remote server or localhost: ?

Please see script in attach:
....
create database 'ch1252' default character set win1252;
commit;
set names win1252;
shell chcp 1252;
connect ch1252;
....
-- i.e. connect via XNet on local machine.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I run server on Linux. I do want to know if localhost: (tcp/ip) changes anything, cause I cannot reproduce.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> I run server on Linux. I do want to know if localhost: (tcp/ip) changes anything, cause I cannot reproduce.

I can reproduce if create database (with charset = win1252) on REMOTE LINUX server and than connect to this .fdb from WINDOWS workstation.
1) isql WI-V2.5.3.26551 does *NOT* show umlaut;
2) isql WI-V2.5.1.26351 *DOES* show umlaut OK.

My actions on LINUX terminal:
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠
bash-3.2$ isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'ch1252.fdb' default character set win1252;
SQL> commit;
SQL> quit; -- unfortunatelly there is NO ability at all to enter national characters in some field inside isql under LINUX, so I do this on WINDOWS (see below)

bash-3.2$ export LANG=de_DE.cp1252;
bash-3.2$ echo $LANG;
de_DE.cp1252

bash-3.2$ isql ch1252.fdb -ch win1252
Database: ch1252.fdb
SQL> shell echo $LANG;
de_DE.cp1252
SQL> create table t (a varchar(30));
SQL> commit;
SQL> quit;

My actions on WINDOWS workstation:
#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠#⁠

i. running isql of WI-V2.5.3.26551 package (november-2012):

C:\1INSTALL\FIREBIRD\FB_25>chcp
<message in russian here about current codepage>: 1252

C:\1INSTALL\FIREBIRD\FB_25>isql 192.168.0.59:/var/db/firebird/ch1252.fdb -ch win1252
Database: 192.168.0.59:/var/db/firebird/ch1252.fdb
SQL> show table;
T
SQL> show version;
ISQL Version: WI-V2.5.3.26551 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26539 Firebird 2.5"
Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26539 Firebird 2.5/tcp (reservdb)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26551 Firebird 2.5/tcp (tlprg)/P12"
on disk structure version 11.2
SQL> insert into t values ('Tipps für Sie'); -- here I enter umlaut in isql under WINDOWS, it can be done OK
SQL> commit;
SQL> select * from t;

A

Tipps f?r Sie -- umlaut is *NOT* displayed!

ii. running isql of WI-V2.5.1.26351 package (october-2011):

C:\1INSTALL\FIREBIRD\FB25_RLS\bin>isql.exe 192.168.0.59:/var/db/firebird/ch1252.fdb -ch win1252
Database: 192.168.0.59:/var/db/firebird/ch1252.fdb
SQL> show version;
ISQL Version: WI-V2.5.1.26351 Firebird 2.5
Server version:
Firebird/linux AMD64 (access method), version "LI-V2.5.2.26539 Firebird 2.5"
Firebird/linux AMD64 (remote server), version "LI-V2.5.2.26539 Firebird 2.5/tcp (reservdb)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.1.26351 Firebird 2.5/tcp (tlprg)/P12"
on disk structure version 11.2
SQL> select * from t;

A

Tipps für Sie -- here the umlaut is displayed OK.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Small part of screenshot with both variants of umlaut displaying is in attach.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

Attachment: umlaut_displaying_problem_in_fb_252.zip [ 12253 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I cannot reproduce with latest snapshot (2.5.3.26566). Please test it.

And no 2.5 version neither gives for me what you say is correct.

What's your initial chcp when you enter in cmd?

Does the problem happens when cmd is used without /u ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> I cannot reproduce with latest snapshot (2.5.3.26566). Please test it.

As I mentioned, the problem appears when we attempt to connect to *2.5.1* server (two.five.ONE) using last isql (two.five.THREE).
I've installed last snapshot just now (2.5.3.26566) and the problem still exists - in both cases of launching cmd.exe (WITH or WITHOUT switch /u).

So, once again.

Test case.
1. Stop all FBs, then start only "old" official FB-2.5.1 (03-oct-2011); in my case it is listening port 3251 and lives in folder C:\1INSTALL\FIREBIRD\FB_25
2. Run cmd.exe and change directory to the folder where isql of LATEST Firebird package exists (in my case LATEST FB-snapshot is here: C:\1INSTALL\FIREBIRD\FB_25\bin\)
3. Create .sql script there with name umlaut2.sql and following content:
---------------
create database 'localhost/3251:C:\1INSTALL\FIREBIRD\FB_25\ch1252.fdb' default character set win1252;
commit;
set names win1252;
shell chcp 1252;
connect localhost/3251:C:\1INSTALL\FIREBIRD\FB_25\ch1252.fdb;
show version;
create table t (a varchar(30));
commit;
insert into t values ('Tipps für Sie');
commit;
select * from t;
drop database;
---------------
4. Run *LATEST* isql:
C:\1INSTALL\FIREBIRD\FB_25\bin\isql.exe -i umlaut2.sql

5. Output of previous step will NOT show umlauts properly.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

PS. Output of isql in this test case:

C:\1INSTALL\FIREBIRD\FB_25>C:\1INSTALL\FIREBIRD\FB_25\bin\isql.exe -i umlaut2.sql
Use CONNECT or CREATE DATABASE to specify a database
<message in national language>: 1252
ISQL Version: WI-V2.5.3.26566 Firebird 2.5 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< NB <<<<<<<<<<
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.1.26351 Firebird 2.5" <<<<<<<<<<< NB <<<<<<<<<<
Firebird/x86/Windows NT (remote server), version "WI-V2.5.1.26351 Firebird 2.5/t
cp (tlprg)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.3.26566 Firebird 2.
5/tcp (tlprg)/P12"
on disk structure version 11.2

A

Tipps f?r Sie

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I cannot reproduce your problem!

It doesn't matter the combination of 2.5.1 / 2.5.3 / client/server, nor the correct nor the incorrect result accordingly of you is returned.

It always shows "Tipps f³r Sie".

My original cmd OEM codepage is 850.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> What's your initial chcp when you enter in cmd?

sorry, I've forgot answer on this question.
my initial chcp in cmd.exe is dos866.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I was using a raster (intead of truetype) font, so it's why I was seeing "³".

Changing to a truetype font and now it's always correct, so I still cannot reproduce, even calling chcp 866 before the test.

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

No branches or pull requests

1 participant