Subject Re: [firebird-support] I cant use Turkish characters in SQLs?
Author Helen Borrie
At 10:07 AM 15/01/2004 +0000, you wrote:
>I cant use Turkish characters in SQLs?
>
>
>SQL : INSERT INTO kullanici (ad) VALUES ('þþýýÝÝ');
>
>
>
>Error: GDS Exception. 335544321. arithmetic exception, numeric
>overflow, or string
>
>truncation
>Cannot transliterate character between character sets
>
>elements:
>
>column "ad" is ISO8859-9 character set
>database is "EMPLOYEE.FDB" (sample database)
>FB1.5
>Windows2000Server
>SQL sender application : Aqua Data Studio 3.0.3

If your client connection and the database's default character set
are CHARACTER SET NONE, then the parser doesn't know to watch for Turkish
characters.

Try using an introducer:

>INSERT INTO kullanici (ad) VALUES ( _ISO8859_9 'þþýýÝÝ');

This works with literals but not, unfortunately, with parameters. For
parameters, you'll need to CAST the input as a varchar of the correct
length for the receiving column:

INSERT INTO kullanici (ad) VALUES (CAST('þþýýÝÝ' AS VARCHAR(20) CHARACTER
SET ISO8859_9);

This is cumbersome. The proper way if most of your character data is
Turkish is to create your database with DEFAULT CHARACTER SET ISO8859_9 and
have the clients connect using ISO8859_9 in the lc_ctype connection
parameter (however your driver surfaces this - don't know anything about
Aqua Data Studio).

/hb