Re: Problems importing Unicode

From: matthias(at)cmklein(dot)de
To: t-ishii(at)sra(dot)co(dot)jp (Tatsuo Ishii)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems importing Unicode
Date: 2004-11-17 04:43:48
Message-ID: E1CUHfY-0002AK-00@www.strato-webmail.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

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?

Thanks

Matt

--- Ursprüngliche Nachricht ---
Datum: 17.11.2004 02:25
Von: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
An: matthias(at)cmklein(dot)de
Betreff: Re: [GENERAL] Problems importing Unicode

> > I have batch files with entries such as
> >
> > INSERT INTO country VALUES (248,'ALA','AX','Åland Islands');
> > INSERT INTO country VALUES (384,'CIV','CI','Côte d\'Ivoire');
> >
> > I tried to execute them using "pgsql \i filename.sql"
> >
> > Unfortunately, I keep getting an error message:
> > "ERROR: invalid byte sequence for encoding "UNICODE": 0xc56c"
> >
> > How can that be possible?
> > My database is set to encoding "UNICODE" and so are the batchfiles.
> >
> > Why does that not work?
>
> I bet your batch file is not encoded in UNICODE (UTF-8).
> --
> Tatsuo Ishii
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel 2004-11-17 08:55:52 Q about NAS mounting things
Previous Message Michael Fuhr 2004-11-17 02:45:32 Re: table configuration tweak for performance gain.