Subject Re: [Firebird-Java] Cannot transliterate character between characterset, Tomcat
Author Christer Nordvik
Hi!

Thanks for the reply!

But I am not using URL to connect to the database. I use the
context.xmlfile as specified in my post and then I get the connection
like this:
Context envCtx = (Context) new InitialContext().
lookup("java:comp/env");

// Look up our data source
ds = (DataSource) envCtx.lookup
("jdbc/MyDB");
ds.getConnection();
...

Where should I specify the encoding? I saw an answer listed in the FAQ 11 (
http://firebird.sourceforge.net/index.php?op=devel&sub=jdbc&id=faq):

It is also possible to set lc_ctype in a deployment descriptor by adding the
following to your deployment descriptor:

<config-property>
<config-property-name>Encoding</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>UNICODE_FSS</config-property-value>
</config-property>
But where should I put this? Web.config? And does this work with Tomcat?

-Christer

On 6/22/07, Allysson Costa <allcostaes@...> wrote:
>
> You need put the expression at end of string (url) of connection:
>
>
> jdbc:firebirdsql:localhost:/path_to_database/database.fdb?lc_type=ISO8859-1
>
> I can´t remmember all possibilites for lc_type but you can try with:
> ISO8859-1 or ISO8859_1.
>
> Allysson
> Brazil
>
> Christer Nordvik <cnordvik@... <cnordvik%40gmail.com>> escreveu: Hi!
>
> I have norwegian characters stored in my Firebird database. The
> database has the character-set ISO-8859-1. When I try to run a "select
> * from table where columnName like '%<norwegian character%' I get the
> error message "Cannot transliterate character between characterset".
>
> What is the default character-set of the SQL connection when using
> Jaybird? And how do I change it? I am using the built-in pooling of
> Tomcat and I am specifying the DB parameters in the
> META-INF/context.xml file:
>
> <Context path="/" reloadable="true">
> <Resource auth="Container"
> driverClassName="org.firebirdsql.jdbc.FBDriver"
> maxActive="100" maxIdle="30" maxWait="100"
> name="jdbc/DB"
> password="xx"
> type="javax.sql.DataSource" url="jdbc:firebirdsql:<url>"
> username="xx"/>
> </Context>
>
> Any help would be very appreciated!
>
> -Christer
>
>
>
>
>
> ---------------------------------
> Novo Yahoo! Cadê? - Experimente uma nova busca.
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]