Subject Inserting Käs e into a CHARACTER SET ASCII column
Author Michael Ludwig
Here's a script to insert "Käse" into a column of CHARACTER SET ASCII.
This shouldn't be possible. I think it is a bug.

C:\Programme\Firebird\Firebird_2_5 :: chcp 1252
Aktive Codepage: 1252.

C:\Programme\Firebird\Firebird_2_5 :: bin\isql -u milu -p moin eins25
Database: eins25, User: milu
SQL> set names cp1252;
SQL> set warnings on;
SQL> create table tascii (s varchar(10) character set ascii);
SQL> create table tlatin (s varchar(10) character set latin1);
SQL> insert into tascii values ('Käse');
SQL> select * from tascii;


SQL> -- This should have raised an error, or truncation warning.
SQL> insert into tlatin values ('Käse');
SQL> select * from tlatin;


SQL> insert into tlatin select * from tascii;
Statement failed, SQLSTATE = 22018
arithmetic exception, numeric overflow, or string truncation
-Cannot transliterate character between character sets
SQL> -- This is wrong, all ASCII should go into a Latin1 table.
SQL> -- Probably a consequence of the ASCII insertion bug above.
SQL> commit;
SQL> drop table tascii;
SQL> drop table tlatin;
SQL> quit;

Michael Ludwig