Re: BUG #3819: UTF8 can't handle \000 - Mailing list pgsql-bugs

From Franklin Schmidt
Subject Re: BUG #3819: UTF8 can't handle \000
Date
Msg-id 7c63948f0712170150w7957adc1wa4227093b700dc17@mail.gmail.com
Whole thread Raw
In response to Re: BUG #3819: UTF8 can't handle \000  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #3819: UTF8 can't handle \000
List pgsql-bugs
On Dec 17, 2007 1:28 AM, Bruce Momjian <bruce@momjian.us> wrote:
>
> Well, I realize 0x00 is a valid ASCII value and therefore a valid UTF8
> value but we have never had anyone complain they can't store the 0x00
> character because it doesn't mean anything in ASCII.  They use bytea to
> store binary data like 0x00.


Here are a few complaints:

http://www.nabble.com/-tp9058998.html
http://www.nabble.com/-tp11750041.html
http://www.nabble.com/-tp8414157.html

I agree that storing 0x00 in a UTF8 string is weird, but I am
converting a huge database to postgres, and in a huge database, weird
things happen.  Using bytea for a text field just because one in a
million records has a 0x00 doesn't make sense to me.  I did hack
around it in my conversion code to remove the 0x00 but I expect that
anyone else who tries converting a big database to postgres will also
confront this issue.

pgsql-bugs by date:

Previous
From: "Franklin Schmidt"
Date:
Subject: Re: BUG #3819: UTF8 can't handle \000
Next
From: "Ronny Hellgren"
Date:
Subject: BUG #3821: Wrong language at "Installation Notes"