Re: JDBC to load UTF8@psql to latin1@mysql
От | Emi Lu |
---|---|
Тема | Re: JDBC to load UTF8@psql to latin1@mysql |
Дата | |
Msg-id | 50C9DF78.4050800@encs.concordia.ca обсуждение исходный текст |
Ответ на | Re: JDBC to load UTF8@psql to latin1@mysql (Thomas Kellerer <spam_eater@gmx.net>) |
Ответы |
Re: JDBC to load UTF8@psql to latin1@mysql
Re: JDBC to load UTF8@psql to latin1@mysql |
Список | pgsql-general |
>> 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. Thanks. -- Emi
В списке pgsql-general по дате отправления: