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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Bug with UTF-8 character


  • From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
  • To: Hans-Jürgen Schönig <postgres(at)cybertec(dot)at>
  • Cc: pgsql-hackers(at)postgresql(dot)org, eg(at)cybertec(dot)at
  • Subject: Re: Bug with UTF-8 character
  • Date: Fri, 26 May 2006 15:48:33 +0200
  • Message-id: <20060526134833(dot)GC27513(at)svana(dot)org>

On Fri, May 26, 2006 at 08:21:56AM +0200, Hans-Jürgen Schönig wrote:
> good morning,
> 
> I got a bug request for the following unicode character in PostgreSQL 
> 8.1.4: 0xedaeb8
> 
> ERROR:  invalid byte sequence for encoding "UTF8": 0xedaeb8
> 
> This one seemed to work properly in PostgreSQL 8.0.3.
> 
> I think the following code in postgreSQL 814 has a bug in it.
> 
> File: postgresql-8.1.4/src/backend/utils/mb/wchar.c

Your character converts to char DBB8. According to the standard,
characters in the range D800-DFFF are not characters but surrogates.
They don't mean anything by themselves and are thus rejected by
postgres.

http://www.unicode.org/faq/utf_bom.html#30

This character should be preceded by a low surrogate (D800-DBFF). You
should combine the two into a single 4-byte UTF-8 character.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog(at)svana(dot)org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group