You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Damian Minkov <da...@space-comm.com> on 2004/07/02 10:27:47 UTC

[DBCP] Encoding Problem

I'm using  Tomcat 4.1.30 on Debian machine.
Version of DBCP -
	libcommons-dbcp-java_1.0-4_all.deb

Have a web application in which I'm using Hibernate.
But when I have configured  to use DBCP for connections which Hibernate
uses
I have problem with encoding ( for retrieving data and for inserting
data in mysql )
but with hibernate using direct connecting there is no problem.

I'm using connection parameters for mysql :
characterEncoding=UTF-8
useUnicode=true

there are set in Hibernate config ( when I try with hibernate direct 
connecting to DB)

And described for DBCP
	<parameter>
		<name>characterEncoding</name>
         	<value>UTF-8</value>
	</parameter>
	<parameter>
		<name>useUnicode</name>
		<value>true</value>
	</parameter>

I've also tried putting parameters in the Connection URL
jdbc:mysql://10.1.1.2/nadia?useUnicode=true;characterEncoding=UTF-8



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [DBCP] Encoding Problem

Posted by Dirk Verbeeck <di...@pandora.be>.
Try

<parameter>
     <name>connectionProperties</name>
     <value>characterEncoding=UTF-8;useUnicode=true</value>
</parameter>

-- Dirk


Damian Minkov wrote:

> I'm using  Tomcat 4.1.30 on Debian machine.
> Version of DBCP -
>     libcommons-dbcp-java_1.0-4_all.deb
> 
> Have a web application in which I'm using Hibernate.
> But when I have configured  to use DBCP for connections which Hibernate
> uses
> I have problem with encoding ( for retrieving data and for inserting
> data in mysql )
> but with hibernate using direct connecting there is no problem.
> 
> I'm using connection parameters for mysql :
> characterEncoding=UTF-8
> useUnicode=true
> 
> there are set in Hibernate config ( when I try with hibernate direct 
> connecting to DB)
> 
> And described for DBCP
>     <parameter>
>         <name>characterEncoding</name>
>             <value>UTF-8</value>
>     </parameter>
>     <parameter>
>         <name>useUnicode</name>
>         <value>true</value>
>     </parameter>
> 
> I've also tried putting parameters in the Connection URL
> jdbc:mysql://10.1.1.2/nadia?useUnicode=true;characterEncoding=UTF-8
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org