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

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: JDBC to load UTF8@psql to latin1@mysql
Дата
Msg-id kab10p$gnl$1@ger.gmane.org
обсуждение исходный текст
Ответ на JDBC to load UTF8@psql to latin1@mysql  (Emi Lu <emilu@encs.concordia.ca>)
Ответы Re: JDBC to load UTF8@psql to latin1@mysql
Список pgsql-general
Emi Lu wrote on 12.12.2012 17:17:
> Good morning,
>
> 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
PreparedStatementand 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.

Thomas



В списке pgsql-general по дате отправления:

Предыдущее
От: Yamen LA
Дата:
Сообщение: Re: Deleting WAL archives and pg_xlog when there is not a shared drive
Следующее
От: yinminmin
Дата:
Сообщение: Re: Looking for cooperators