Re: Invalid byte sequence for encoding "UTF8": 0xedbebf

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "BRUSSER Michael *EXTERN*" <Michael(dot)BRUSSER(at)3ds(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Invalid byte sequence for encoding "UTF8": 0xedbebf
Date: 2011-06-16 09:15:38
Message-ID: D960CB61B694CF459DCFB4B0128514C2068E56AF@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

BRUSSER Michael wrote:
> Is there a way to find the records with the text field containing
Unicode bytes "0xedbebf"?
>
> Unfortunately this is a very old version 7.3.10

This should work on 7.3 (according to the documentation):

SELECT id FROM nlsdata WHERE position('\360\235\204\236'::bytea IN
val::bytea) = 1;

Here "val" is the column containing the values in question.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sanjay Rao 2011-06-16 09:20:02 Re: streaming replication trigger file
Previous Message John R Pierce 2011-06-16 08:44:55 Re: streaming replication trigger file