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

Re: BUG #3638: UTF8 Character encoding does NOT work

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Fil Matthews" <fil(at)internetmediapro(dot)com>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #3638: UTF8 Character encoding does NOT work
Date: 2007-09-27 08:46:26
Message-ID: 87ps04ebrx.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-bugs
"Fil Matthews" <fil(at)internetmediapro(dot)com> writes:

> In Short A Postgres UTF8 database .. PGCLIENENCODING=UTF8 
...
> Insert into test values (  chr(146));;

Can you explain what you expected to happen here? Did you, for example, expect
the character with Unicode code point 146 to be inserted? Because the single
byte 146 isn't a valid UTF8 character.

In PostgreSQL 8.2 I don't think there's any function to generate an arbitrary
Unicode code point. You'll have to do that on the client end and encode it in
UTF8 before sending. In PostgreSQL 8.3 chr() will in fact be modified to do
this.

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Hannu ValtonenDate: 2007-09-27 09:59:08
Subject: BUG #3639: queryplanner degrades to a sequential scan even if there's an index
Previous:From: Heikki LinnakangasDate: 2007-09-27 07:59:45
Subject: Re: BUG #3638: UTF8 Character encoding does NOT work

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