Re: Problems importing Unicode

From: Richard Huxton <dev(at)archonet(dot)com>
To: matthias(at)cmklein(dot)de
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-general(at)postgresql(dot)org
Subject: Re: Problems importing Unicode
Date: 2004-11-17 09:20:17
Message-ID: 419B17D1.50300@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

matthias(at)cmklein(dot)de wrote:
> Well, they were generated by MySQL and I can open them with e.g. the
> Windows Editor Notepad. But I don't know if they are actually encoded in
> UNICODE.
> Since I can open the file with Notepad and read the statements, I assume,
> it is not UNICODE. They look just like in the email below.

Probably some WINxxx encoding. I've seen something similar with data
from MS-Access.

> The problem are apparently those characters Å or ô and I really would like
> to know how to import those files into PostgreSQL 8.0.0
>
> Is there a switch I can use to do a codepage / encoding translation?
>
> Why are MS Access or even MySQL able to read those files without trouble
> but PostgreSQL reports an error?

Because they're using the same WIN locale details. What you might want
to try is to set your client encoding at the top of the batch file and
see if PostgreSQL can't convert it for you.

SET CLIENT_ENCODING = WIN1250;

There's a list of encodings PG can convert for you in the manual (see
the chapter "Automatic Character Set Conversion Between Server and
Client" in the Localization section.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Barwick 2004-11-17 10:48:39 Re: Transactions in different DB
Previous Message Ben Trewern 2004-11-17 09:20:00 Re: Fwd: Problem installing Postgresql on MDK10.0