Subject | Re: [ib-support] unicode BUG in Firebird (probably in InterBase too) |
---|---|
Author | Herbert.Augustiny@sptroth.com |
Post date | 2002-01-29T10:39:26Z |
Hi Tomas
IB/FB does only check the byte count of an insert.
Your country_code domain is defined as 2 Unicode chars. For one unicode
char IB/FB reserves 3 bytes, in your case a total of 6 bytes. This means as
long as the string you are inserting does not exceed 6 bytes, it will get
inserted and even read back.
The standard charset (don't know if it is US-ASCII or what) is represented
as one byte values also in unicode strings.
Regards,
Herbert
|---------+---------------------------->
| | Tomas MichalĂk |
| | <michalik@proca.c|
| | z> |
| | |
| | 29.01.2002 11:34 |
| | Please respond to|
| | ib-support |
| | |
|---------+---------------------------->
| To: ib-support@yahoogroups.com |
| cc: |
| Subject: [ib-support] unicode BUG in Firebird (probably in InterBase too) |
my colleague just spotted strange behaviour and I consider this a bug.
CREATE DOMAIN COUNTRY_CODE AS CHAR(2) CHARACTER SET UNICODE_FSS NOT
NULL;
CREATE TABLE TAB_COUNTRY
(
COUNTRY COUNTRY_CODE,
NAME VARCHAR(40) CHARACTER SET UNICODE_FSS NOT NULL,
PRIMARY KEY (COUNTRY)
);
When connecting to this table via IBConsole (IBExpert or probably
anything else)
using charset UNICODE_FSS, following SQL command should not execute - it
is CHAR(2) column - but it DOES !
insert into tab_country values ('aaaaaa', 'bbbbbbbbbbbbbbbb')
We tested this on FB 0.9.4 SS for Linux, FB1 RC2 for Windows ...
Is this known bug ? (I couldn't find anything about it)
Best regards,
Tom
=================================
Tomas Michalik
ProCA, s. r. o.
V Luzich 818, Praha 4
Czech Republic
e-mail: michalik@...
tel: +420 2 67283446
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
IB/FB does only check the byte count of an insert.
Your country_code domain is defined as 2 Unicode chars. For one unicode
char IB/FB reserves 3 bytes, in your case a total of 6 bytes. This means as
long as the string you are inserting does not exceed 6 bytes, it will get
inserted and even read back.
The standard charset (don't know if it is US-ASCII or what) is represented
as one byte values also in unicode strings.
Regards,
Herbert
|---------+---------------------------->
| | Tomas MichalĂk |
| | <michalik@proca.c|
| | z> |
| | |
| | 29.01.2002 11:34 |
| | Please respond to|
| | ib-support |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|| |
| To: ib-support@yahoogroups.com |
| cc: |
| Subject: [ib-support] unicode BUG in Firebird (probably in InterBase too) |
>--------------------------------------------------------------------------------------------------------------------------------------------------|Hi,
my colleague just spotted strange behaviour and I consider this a bug.
CREATE DOMAIN COUNTRY_CODE AS CHAR(2) CHARACTER SET UNICODE_FSS NOT
NULL;
CREATE TABLE TAB_COUNTRY
(
COUNTRY COUNTRY_CODE,
NAME VARCHAR(40) CHARACTER SET UNICODE_FSS NOT NULL,
PRIMARY KEY (COUNTRY)
);
When connecting to this table via IBConsole (IBExpert or probably
anything else)
using charset UNICODE_FSS, following SQL command should not execute - it
is CHAR(2) column - but it DOES !
insert into tab_country values ('aaaaaa', 'bbbbbbbbbbbbbbbb')
We tested this on FB 0.9.4 SS for Linux, FB1 RC2 for Windows ...
Is this known bug ? (I couldn't find anything about it)
Best regards,
Tom
=================================
Tomas Michalik
ProCA, s. r. o.
V Luzich 818, Praha 4
Czech Republic
e-mail: michalik@...
tel: +420 2 67283446
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/