You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Maciej Leks <ml...@zeus.polsl.gliwice.pl> on 2002/05/09 10:10:59 UTC

Re: torque encoding question?

Hello!

I am not sure if my solution will be enough for you but I got the same
problem a couple months ago with polish character encoding and MySQL!

You need only inform the MySQL JDBC driver that you want to use a
specific encoding, so in your Torque.properties in the database
section, add something like this:

torque.database.ChineseProject.driver=org.gjt.mm.mysql.Driver
torque.database.ChineseProject.url=jdbc:mysql://127.0.0.1/intraco?useUnicode=true&characterEncoding=ISO-8859-1
torque.database.ChineseProject.username=
torque.database.ChineseProject.password=

I do not know if it is only solution but it works well!


Best regards
jgvc> Hi all,
jgvc> I met a problem when save Chinese characters to MYSQL db. MYSQL need
jgvc> 8859_1 encoded sqls while torque build a GBK statement. I do need the
jgvc> input and output charset be GBK encoded, but sometime sqls would be
jgvc> transformed into another charset. Is there any place to make the
jgvc> transformation?




______________________________________
 Leksiu (mleks@zeus.polsl.gliwice.pl)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re[2]: torque encoding question?

Posted by Maciej Leks <ml...@zeus.polsl.gliwice.pl>.
Hello

I really do not know, but...See the Oracle JDBC driver description!
If yes, the Oracle use different parameter writing convension I think!
For instance, the PostgreSQL database encoding standard must be set
before or during dabatabase creation and is not dependent on the JDBC
connectio uri! Each DB provider uses its own approch to the encoding
problem!

Good luck!
j> Well, thank you very much Leks, you really helped me a lot.

j> A common way is better because when I use oracle, same trouble
j> appeared(UTF 2 GBK). Can JDBC for oracle and odbc-bridge can specify
j> charset in uri? How?


j> -----Original Message-----
j> From: Maciej Leks [mailto:mleks@zeus.polsl.gliwice.pl] 
j> Sent: 2002?5?9? 1:11
j> To: Turbine Users List
j> Subject: Re: torque encoding question?

j> Hello!

j> I am not sure if my solution will be enough for you but I got the same
j> problem a couple months ago with polish character encoding and MySQL!

j> You need only inform the MySQL JDBC driver that you want to use a
j> specific encoding, so in your Torque.properties in the database
j> section, add something like this:

j> torque.database.ChineseProject.driver=org.gjt.mm.mysql.Driver
j> torque.database.ChineseProject.url=jdbc:mysql://127.0.0.1/intraco?useUni
j> code=true&characterEncoding=ISO-8859-1
j> torque.database.ChineseProject.username=
j> torque.database.ChineseProject.password=

j> I do not know if it is only solution but it works well!


j> Best regards
jgvc>> Hi all,
jgvc>> I met a problem when save Chinese characters to MYSQL db. MYSQL
j> need
jgvc>> 8859_1 encoded sqls while torque build a GBK statement. I do need
j> the
jgvc>> input and output charset be GBK encoded, but sometime sqls would
j> be
jgvc>> transformed into another charset. Is there any place to make the
jgvc>> transformation?




j> ______________________________________
j>  Leksiu (mleks@zeus.polsl.gliwice.pl)


j> --
j> To unsubscribe, e-mail:
j> <ma...@jakarta.apache.org>
j> For additional commands, e-mail:
j> <ma...@jakarta.apache.org>



j> --
j> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
j> For additional commands, e-mail: <ma...@jakarta.apache.org>





______________________________________
 Leksiu (mleks@zeus.polsl.gliwice.pl)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: torque encoding question?

Posted by joeblack <jo...@vtradex.com>.
Well, thank you very much Leks, you really helped me a lot.

A common way is better because when I use oracle, same trouble
appeared(UTF 2 GBK). Can JDBC for oracle and odbc-bridge can specify
charset in uri? How?


-----Original Message-----
From: Maciej Leks [mailto:mleks@zeus.polsl.gliwice.pl] 
Sent: 2002?5?9? 1:11
To: Turbine Users List
Subject: Re: torque encoding question?

Hello!

I am not sure if my solution will be enough for you but I got the same
problem a couple months ago with polish character encoding and MySQL!

You need only inform the MySQL JDBC driver that you want to use a
specific encoding, so in your Torque.properties in the database
section, add something like this:

torque.database.ChineseProject.driver=org.gjt.mm.mysql.Driver
torque.database.ChineseProject.url=jdbc:mysql://127.0.0.1/intraco?useUni
code=true&characterEncoding=ISO-8859-1
torque.database.ChineseProject.username=
torque.database.ChineseProject.password=

I do not know if it is only solution but it works well!


Best regards
jgvc> Hi all,
jgvc> I met a problem when save Chinese characters to MYSQL db. MYSQL
need
jgvc> 8859_1 encoded sqls while torque build a GBK statement. I do need
the
jgvc> input and output charset be GBK encoded, but sometime sqls would
be
jgvc> transformed into another charset. Is there any place to make the
jgvc> transformation?




______________________________________
 Leksiu (mleks@zeus.polsl.gliwice.pl)


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>