Search Postgresql Archives

Re: JDBC to load UTF8@psql to latin1@mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Emi Lu wrote on 13.12.2012 15:00:

Is there a simple way to load UTF8 data in psql to mysql(with latin1
encoding) through JDBC?

All you need to do is to query the source database, then use
ResultSet.getString() to obtain the data and use a PreparedStatement and
PreparedStatement.setString() to insert/update  the data on the target
database.

The JDBC drivers will handle all the conversion.
Do NOT manually convert the data.

getString() and setString() will do everything correctly.

I am not using stmt directly but through Mybatis for all db transactions.

So, this approach will not work.

Then it's a problem of that MyBatis thing.

Thomas





--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux