Subject Re: Unicode problem
Author wyasabc <wyasabc@yahoo.co.uk>
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy
<rrokytskyy@y...>" <rrokytskyy@y...> wrote:
> > I have a problem with using sql select statement with unicode
value.
> > for example:
> > Select * from Table where ID = 1.
> > it's work well on unicode data.
> > but when i try to find some record using where clause that
contain
> > a unicode character it never return a result and some time get
> > SQLException.
> > my query is :
> > select * from Table where field = 'some unicode characters';
> >
> > i use jsp and java bean and firebirdsql jdbc.
>
> - what exception do you get?

> - what is your client encoding (value of lc_ctype connection
> parameter)?


>
> Thanks!
> Roman Rokytskyy


I got an exception like this:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. arithmetic
exception, numeric overflow, or string truncation
Cannot transliterate character between character sets
at org.firebirdsql.jdbc.FBResultSet$FBCachedFetcher.<init>
(FBResultSet.java:2666)
at org.firebirdsql.jdbc.FBResultSet.<init>
(FBResultSet.java:122)
at org.firebirdsql.jdbc.FBStatement.getCachedResultSet
(FBStatement.java:551)

I've add lc_ctype parameter in connection parameter at poolman.props
file like this : lc_ctype=UNICODE_FSS

on jsp page I've try to add some encoding on String object:
ex: String value = request.getParameter("value");
String value1 = new String(value.getBytes("utf-8"));
then i used this value1 as parameter in JavaBean method.
for information I use Resin ver 2.1.0 as application server.

Thanks,
Wayan.