Subject | Re: [firebird-support] Cannot transliterate character between character sets |
---|---|
Author | Pavel Menshchikov |
Post date | 2005-03-29T13:33:59Z |
Hello Thiago,
TC> I´m developing with jaybird JDBC driver and i found some problems with
TC> character sets convertion.
TC> I´m developing with java servlets under windows and i´ll publicate on
TC> linux. I´m using tomcat to publicate my servlets. When i use windows
TC> the page showed is correctly, but when i put the servlet under windows
TC> the especial characters appers with "?". I resolved the problem
TC> putting a lc_ctype parameter in the string connection like:
TC> "org.firebirdsql.jdbc.FBDriver",
TC> "jdbc:firebirdsql:marte/3050:freire?lc_ctype=ISO8859_1", ...
TC> With lc_ctype the characters appears correctly, but i found some
TC> problems with some queries with string concatenation. The problem is:
TC> I have a table RAIS_ADMISSAO with the folowing fields:
TC> ADM_COD - smallint
TC> ADM_DS - varchar 255
TC> CAG_COD - smallint
TC> I want to make the folowing query:
TC> select ADM_COD, CAST(ADM_COD AS VARCHAR (2)) || ' - ' || ADM_DS AS
TC> ADMISSAO from RAIS_ADMISSAO
TC> When the lc_ctype is not set, the query runs without erros, but when
TC> the lc_ctype=ISO8859_1 is set a have the flowing exception:
TC> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544321.
TC> arithmetic exception, numeric overflow, or string truncation
TC> Cannot transliterate character between character sets
TC> ...
TC> Please, anyone knows how to resolve these problem???
What is your DB DEFAULT CHARACTER SET? I think it has to be ISO8859_1,
i.e. the same as lc_ctype. I'm not sure if you can ALTER DATABASE to
modify that value, I assume you have to recreate your DB with that
option and pump the data into the new DB.
And as langref.pdf says, if DEFAULT CHARACTER SET is omitted,
character set defaults to NONE.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com
TC> I´m developing with jaybird JDBC driver and i found some problems with
TC> character sets convertion.
TC> I´m developing with java servlets under windows and i´ll publicate on
TC> linux. I´m using tomcat to publicate my servlets. When i use windows
TC> the page showed is correctly, but when i put the servlet under windows
TC> the especial characters appers with "?". I resolved the problem
TC> putting a lc_ctype parameter in the string connection like:
TC> "org.firebirdsql.jdbc.FBDriver",
TC> "jdbc:firebirdsql:marte/3050:freire?lc_ctype=ISO8859_1", ...
TC> With lc_ctype the characters appears correctly, but i found some
TC> problems with some queries with string concatenation. The problem is:
TC> I have a table RAIS_ADMISSAO with the folowing fields:
TC> ADM_COD - smallint
TC> ADM_DS - varchar 255
TC> CAG_COD - smallint
TC> I want to make the folowing query:
TC> select ADM_COD, CAST(ADM_COD AS VARCHAR (2)) || ' - ' || ADM_DS AS
TC> ADMISSAO from RAIS_ADMISSAO
TC> When the lc_ctype is not set, the query runs without erros, but when
TC> the lc_ctype=ISO8859_1 is set a have the flowing exception:
TC> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544321.
TC> arithmetic exception, numeric overflow, or string truncation
TC> Cannot transliterate character between character sets
TC> ...
TC> Please, anyone knows how to resolve these problem???
What is your DB DEFAULT CHARACTER SET? I think it has to be ISO8859_1,
i.e. the same as lc_ctype. I'm not sure if you can ALTER DATABASE to
modify that value, I assume you have to recreate your DB with that
option and pump the data into the new DB.
And as langref.pdf says, if DEFAULT CHARACTER SET is omitted,
character set defaults to NONE.
HTH
--
Best regards,
Pavel Menshchikov
http://www.ls-software.com