Subject Re: [ib-support] character count with CHAR type on UNICODE charset
Author Martijn Tonies
Hi,

What happens if you connect to the database using the UNICODE_FSS
characterset?


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com

Firebird Workbench - the developer tool for Firebird
http://www.upscene.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

> I have one simple question - when I insert value to CHAR(1) field on
> UNICODE_FSS database, SELECT returns 3 characters.
> I use Firebird SS 1.0.796 on Windows XP platform (the same efects was on
> Linux too).
>
> Example:
> create database "localhost:/database/wis.gdb" page_size 4096 default
> character set UNICODE_FSS;
> connect localhost:/database/wis.gdb;
> CREATE DOMAIN IDKONTAKT AS integer;
> CREATE DOMAIN PRIVATNI AS char(1);
> create table kontakty
> (
> kontakt IDKONTAKT not null,
> privatni PRIVATNI not null,
> constraint kontakty_pk unique(kontakt)
> );
> commit;
> insert into kontakty values (1,'N');
> commit;
> select '->' || privatni || '<-' from kontakty;
> /* returns ->N <- (N and 2 spaces) */
>
> When I use Varchar instead Char, it works as I expected and returns 'N'.
> Is this bug or feature?
>
> The same output is in JayBird (3 chars), but (if I remember) the
Interclient
> returned one Unicode character ?
>
> Leos