Skip site navigation (1) Skip section navigation (2)

Re: Importing data - possible UTF8 import bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mikel Lindsaar" <raasdnil(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Importing data - possible UTF8 import bug?
Date: 2008-07-11 03:32:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
"Mikel Lindsaar" <raasdnil(at)gmail(dot)com> writes:
> But I am hitting a problem.  When I try to import the result with COPY
> I am getting:
> ERROR: invalid byte sequence for encoding "UTF8": 0xa2
> And gives me a line reference.

> I then grabbed that line out of the file, unpacked each byte into a
> decimal representation and 162 does not appear anywhere.

Sure you're counting the lines right?  I believe the number COPY
gives you is the N'th line of COPY data (ie, N lines after the
COPY command) --- not the N'th line of the whole file.  Another
thing to check is whether embedded newlines &such are throwing
off your count.

			regards, tom lane

In response to

pgsql-admin by date

Next:From: neo3 matrixDate: 2008-07-11 07:58:45
Subject: Database backup problem.........
Previous:From: Mikel LindsaarDate: 2008-07-11 02:56:47
Subject: Re: Importing data - possible UTF8 import bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group