Subject Two problems: charsets and gbak
Author Douglas Tosi
Hello!

I'm having two problems and have no clue if they are related to each other
or not. I'll try to describe it.

The following examples were tested on NT4w+SP6, W98-2 and W2kPro, all with
RC1(WI-T1.0.0.567) and produced the same results.

I create a database using the ISO-8859-1 charset this way:
Load an sql script in IBConsole
SET SQL DIALECT 3;
SET NAMES ISO8859_1;

CREATE DATABASE 'DESENV_05:G:\DB.gdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 8192
DEFAULT CHARACTER SET ISO8859_1;

CREATE TABLE C_STATUS_AGENTE (
CODIGO INTEGER NOT NULL,
DESCRICAO VARCHAR(50) NOT NULL COLLATE PT_PT);

up to this point it runs fine, but when it reaches this line:
INSERT INTO C_STATUS_AGENTE (CODIGO, DESCRICAO) VALUES (0, 'Dispon´┐Żvel'); /*
note the special "i" */
i receive a transliteration error (numeric overflow or string truncation
... )

If i run the same sql script on IBExpert, everything is fine. But that is
just the small problem.
Now I backup and restore this newly created database, using:
gbak -b -v db.gdb db.gbk
gbak -c -v -p 8192 db.gbk db2.gdb

Connect to this restored database and I start receiving transliteration
erros whenever I try to read values with non-low-ASCII chars.
Now I backup this database:
gbak -b -v db2.gdb db2.gbk

and try to restore it:
gbak -c -v -p 8192 db.gbk db3.gdb
and receive the following error:
ERROR: attempt to store duplicate value (visible to active transactions) in
unique index "RDB$INDEX_11"
Exiting before completion due to errors

My little research showed me that rdb$index_11 is on rdb$generators and
there is no possible way i could have to generators with the same name.

I hope i'm doing something really wrong here.
If you need the full script to try to reproduce this, please let me know.

Thanks for your time and sorry for my poor english,

dog