Re: invalid byte sequence for encoding "UTF8": 0x00 - Mailing list pgsql-jdbc

From Albe Laurenz
Subject Re: invalid byte sequence for encoding "UTF8": 0x00
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17D305A8@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: invalid byte sequence for encoding "UTF8": 0x00  (Andreas Joseph Krogh <andreas@visena.com>)
List pgsql-jdbc
Andreas Joseph Krogh wrote:
>>>> You will never be able to insert a null character into a PostgreSQL database.
>>>> You can either modify the source data or change the data in transit.
>>>
>>> This is not 100% true, but is true for text-fields. You can insert \0 into BYTEA columns.
>> 
>> I was talking about characters, not bytes.
> 
> '\0' is a character. I see noe specification of character-fields (like varchar and text) in your
> answer.

My definition would be:
A character is something that is normally written on paper and has
to be encoded to be stored in a computer system.
(seems not to stray to far from Wikipedia's definition.)

Characters can only occur in text fields.

An element of a bytea is not a character along these lines; hence the
type is called "BYTE Array".

But let's not split hairs, this is getting away from the problem at hand,
and I think you know what I mean and vice versa.

Yours,
Laurenz Albe

pgsql-jdbc by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: invalid byte sequence for encoding "UTF8": 0x00
Next
From: Christophe Canovas
Date:
Subject: Re: Cursors removed with commit