From: | Markus Schaber <schabi(at)logix-tt(dot)com> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | Ronald Gallagher <RGallagher(at)psych(dot)org>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: ASCII to UNICODE conversion problems |
Date: | 2005-05-25 11:25:52 |
Message-ID: | 429460C0.4030803@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2005-05-25 12:04:01 | Re: IN/OUT parameters |
Previous Message | Kris Jurka | 2005-05-25 06:48:53 | Re: Problem catching multiple values |