Re: problem with importing dbf file into postgresql using navicat on mac OS X

Lists: pgsql-general
From: Mathias Ghys <mathias(dot)ghys(at)telenet(dot)be>
To: pgsql-general(at)postgresql(dot)org
Subject: problem with importing dbf file into postgresql using navicat on mac OS X
Date: 2008-05-12 17:28:20
Message-ID: 13D4CE9B-D2FF-4722-8873-4CE14801A794@telenet.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi everyone,

I bought a dvd containing all the roads and positions of houses in
Belgium. Now it already worked to import all the gml files into my
postgresql database. But the easier import of dbf files always turns
out wrong.

I use navicat on a mac OS X system. I always get the following error
message:

Error Message: ERROR: invalid byte sequence for encoding "UTF8":
0xe96f70
HINT: This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".

My postgresql database is UTF-8 encoded. With importing I get the
following data:

http://server58.dedicatedusa.com/~mathias/mathias/datatypes.tiff

do you guys have any idea what i've been doing wrong and how I could
get the *.dbf files into my postgresql database?

many thanks already

Mathias Ghys


From: John DeSoi <desoi(at)pgedit(dot)com>
To: Mathias Ghys <mathias(dot)ghys(at)telenet(dot)be>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problem with importing dbf file into postgresql using navicat on mac OS X
Date: 2008-05-15 12:34:54
Message-ID: 26ECB182-CE12-42CE-830B-81E0A6F2FF4D@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


On May 12, 2008, at 1:28 PM, Mathias Ghys wrote:

> Error Message: ERROR: invalid byte sequence for encoding "UTF8":
> 0xe96f70
> HINT: This error can also happen if the byte sequence does not
> match the encoding expected by the server, which is controlled by
> "client_encoding".
>
> My postgresql database is UTF-8 encoded. With importing I get the
> following data:
>
> http://server58.dedicatedusa.com/~mathias/mathias/datatypes.tiff
>
> do you guys have any idea what i've been doing wrong and how I could
> get the *.dbf files into my postgresql database?

I think the problem is that Navicat sets your client connection to
UTF-8 but the data you are importing from the file is not UTF-8.
Navicat should have a way for you to change your client encoding to
match what is in the file. The main problem is you need to know
exactly what encoding is being used in the file.

If the dbf file is really broken (invalid sequences no mater how it is
encoded) then you'll need to fix that first.

John DeSoi, Ph.D.