From: Markus Schaber <schabi@logix-tt.com>
To: Kris Jurka <books@ejurka.com>
Cc: Ronald Gallagher <RGallagher@psych.org>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ASCII to UNICODE conversion problems
Date: Wed, 25 May 2005 13:25:52 +0200
Message-ID: <429460C0.4030803@logix-tt.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0505111900070.27750@leary.csoft.net>
References: <FCAD0432FD2FC449BEA84B820D36398501099845@ARES.psych.org>
<Pine.BSO.4.56.0505111900070.27750@leary.csoft.net>
Hi, Ronald,
Kris Jurka wrote:
>>I have read a lot online about how I need to convert my ASCII database
>>into UNICODE but I haven't been able to successfully do that. I have
>>dumped the DB and then added SET CLIENT_ENCODING TO 'UNICODE'; to the
>>top of the dump file and then tried to restore it to a UNICODE encoded
>>database. When I tried this only some of the tables (I assume the ones
>>without special characters) got imported, but many tables had zero rows.
> Basically the JDBC driver was detecting the fact that your data is not
> unicode. You've put this into a file and labeled it unicode (via SET
> client_encoding), so now the server is complaining that your data is not
> unicode.
>
> You need to determine what encoding your data is actually in and convert
> it to unicode with something like iconv.
Another possibility is to create the database in unicode (or any
encoding that can store your data), and put "SET CLIENT_ENCODING TO
'your-real-encoding';" at the top of your dump file. This way PostgreSQL
will convert your data from your-real-encoding to the database encoding
on dump load, an then to unicode with JDBC access.
HTH,
Markus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: schabi@logix-tt.com, books@ejurka.com, RGallagher@psych.org
Subject: Re: ASCII to UNICODE conversion problems
In-Reply-To: <429460C0.4030803@logix-tt.com>
References: <FCAD0432FD2FC449BEA84B820D36398501099845@ARES.psych.org> <Pine.BSO.4.56.0505111900070.27750@leary.csoft.net> <429460C0.4030803@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox