pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mario Splivalo <msplival@jagor.srce.hr>
Cc: pgsql-admin@postgresql.org
Subject: Re: Pg 7.4 to 8.1 UTF problems
Date: Sat, 11 Feb 2006 11:14:37 -0500
Message-ID: <8168.1139674477@sss.pgh.pa.us> (raw)
In-Reply-To: <1139151996.14901.8.camel@localhost.localdomain>
References: <1139151996.14901.8.camel@localhost.localdomain>

Mario Splivalo <msplival@jagor.srce.hr> writes:
> psql:the_database.psql:86: ERROR:  invalid UTF-8 byte sequence detected
> near byte 0x8d
> CONTEXT:  COPY _netsms, line 1367, column text: "Padamo u pozu 69.uz
> \uffffmas mog macana u usta.a ja tvoju ljepu picu"

7.4's checking for valid UTF8 code sequences had some bugs, causing it
to accept data that is not valid UTF8.  8.1 has tightened that up.

> From here it is visible that the troubled charachter has has ASCII HEX
> code 8d, which is regular ascii charachter.

It is not ASCII, and it is not legal UTF8 either, at least not without
another byte >= 0x80 after it.

You need to decide whether this is bad data (and if so fix it), or
whether you misdetermined what the encoding of your data is (and if
so, change to the correct encoding declaration).

			regards, tom lane



view thread (3+ messages)

Message-ID: <8168.1139674477@sss.pgh.pa.us>
Permalink:  ../8168.1139674477@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8168.1139674477@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, msplival@jagor.srce.hr
  Subject: Re: Pg 7.4 to 8.1 UTF problems
  In-Reply-To: <8168.1139674477@sss.pgh.pa.us>
  References: <1139151996.14901.8.camel@localhost.localdomain> <8168.1139674477@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox