Page 1 of 1

ZEOS, Firebird and German Umlaute

Posted: 19.12.2005, 10:36
by Josef Koller
Hello,

I have problems with a SQL statement like:

ZReadOnlyQuery1.sql.add('Select * from T_Buchung where "Art_Name" like :sbegriff');
ZReadOnlyQuery1.Params[0].asstring:= sbegriff;

sbegriff is for example: %Blüte%

I get an error like:
arithmetic exception, numeric overflow or string truncation Cannot transliterate character between character sets

How can I find a string with German Umlaute like Ü,Ä,Ö, ect with a SQL-Statement?

Many thanks and best regards

Josef

Posted: 19.12.2005, 11:22
by Domo Sokrat
Hi Josef,

:shock: did you create your database with default character set "ISO8859_1"?

And did you set the codepage for ZConnection that way ?...

[syntax="delphi"]ZConnection.Properties.Add ('lc_ctype=ISO8859_1');

or

ZConnection.Properties.Add ('Codepage=ISO8859_1');[/syntax]

Posted: 19.12.2005, 11:57
by Josef Koller
Hello,

I have the following entries:

Database-Info:

Firebird 1.5
ISO8859_1
FontCharacterSet: ANSI_CHARSET

and in ZConnection1.Properties:
Dialect=3
lc_ctype=ISO8859_1

Posted: 19.12.2005, 13:54
by Domo Sokrat
Hi Josef,

the same error occurs in my sample app if I use

Code: Select all

lc_ctype=ISO8859_1
Using

Code: Select all

Codepage=ISO8859_1
works perfectly!

Regards.

Btw: Created my sample database with default charset ISO8859_1 and created the test table without specifying the characterset in my CREATE TABLE command...

Posted: 19.12.2005, 15:36
by Josef Koller
Hi,

Codepage=ISO8859_1

in the properties works perfectly. Now I get my Ö,Ä,Ü, ect.
Thanks for the posting.

Josef