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

From: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: JDBC to load UTF8@psql to latin1@mysql
Date: 2012-12-13 17:18:21
Message-ID: CA+6hpanviWn_m2n=qghEsP3ipq8hVoW64v9ta79XkwQ8=t7tPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Yeah, I agree this is the right answer here, since you're using JDBC. By
the time you get a String from the MySQL driver, it's already in Java's
2-bytes-per-char format. And the Postgres driver will deal with the
encoding on the output side. So the code I provided won't help you. I'm
afraid I don't know about Mybatis, but if it's built on JDBC I'd think
you've just got a configuration problem with what encoding the client
expects at either end.

Paul

--
_________________________________
Pulchritudo splendor veritatis.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Heikki Linnakangas 2012-12-13 17:19:36 pgsql: Allow a streaming replication standby to follow a timeline switc
Previous Message Adrian Klaver 2012-12-13 16:56:21 Re: initdb error