Issue Details (XML | Word | Printable)

Key: CORE-3976
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Pavel Zotov
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

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

Created: 09/Nov/12 07:13 PM   Updated: 28/Nov/12 03:18 PM
Component/s: ISQL
Affects Version/s: 2.5.2
Fix Version/s: None

File Attachments: 1. Zip Archive umlaut_displaying_problem_in_fb_252.zip (13 kB)
2. Zip Archive win1252_umlaut_test.zip (0.3 kB)



 Description  « Hide
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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 09/Nov/12 07:29 PM
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

Adriano dos Santos Fernandes added a comment - 12/Nov/12 02:32 PM
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: ?

Pavel Zotov added a comment - 12/Nov/12 02:41 PM
> 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.

Adriano dos Santos Fernandes added a comment - 12/Nov/12 02:46 PM
I run server on Linux. I do want to know if localhost: (tcp/ip) changes anything, cause I cannot reproduce.

Pavel Zotov added a comment - 12/Nov/12 09:37 PM
> 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.

Pavel Zotov added a comment - 12/Nov/12 09:45 PM
Small part of screenshot with both variants of umlaut displaying is in attach.

Adriano dos Santos Fernandes added a comment - 27/Nov/12 02:40 PM
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 ?

Pavel Zotov added a comment - 27/Nov/12 03:20 PM
> 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.

Pavel Zotov added a comment - 27/Nov/12 03:22 PM
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

Adriano dos Santos Fernandes added a comment - 28/Nov/12 02:35 PM
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.

Pavel Zotov added a comment - 28/Nov/12 02:51 PM
> 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.

Adriano dos Santos Fernandes added a comment - 28/Nov/12 03:18 PM
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.