Re: invalid byte sequence

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Maximilian Tyrtania <lists(at)contactking(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: invalid byte sequence
Date: 2011-03-05 06:52:06
Message-ID: 4D71DD96.2010900@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/03/2011 10:18 PM, Maximilian Tyrtania wrote:
> Am 04.03.2011 um 11:01 schrieb Craig Ringer:
>
>> On 04/03/11 00:02, Maximilian Tyrtania wrote:
>>> After upgrading to pg 9.0.3 (from 8.4.2) on my Mac OS 10.6.2 machine i find this in my log file (a lot):
>>>
>>> <postgres%192.168.254.210%2011-03-03 16:37:30 CET%22021>STATEMENT: SELECT pg_file_read('pg_log/postgresql-2011-03-03_000000.log', 250000, $
>>> <postgres%192.168.254.210%2011-03-03 16:37:32 CET%22021>ERROR: invalid byte sequence for encoding "UTF8": 0xe3bc74
>>
>> The "0xe3bc74" looks like gibberish in any encoding I can think of.
>> What's the input file?
>
> We are talking about pg's own logfile here. I thought that was clear. Look at the file's name. Apparently some guy on the french pgAdmin list has the very same problem. I have no idea how "0xe3bc74" made it into the log file.

Oh. Good point.

PostgreSQL's logs suffer from an interesting bug in situations where the
server uses mixed encodings, causing the log files to contain text with
more than one encoding. There's been prior discussion of it, but no
conclusions.

>
>> Is it sanely encoded? Do you know what encoding
>> it is in?
>
> As i said, i initially set lc_messages to 'de_DE-UTF8', so i assume that's what the log file was in. I changed it to 'c' now.

Well, the PostgreSQL log files are *not* sanely encoded, so that's part
of the problem.

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-03-05 11:55:18 9.1 - rewrite less alter table?
Previous Message David Johnston 2011-03-05 03:28:49 Re: test data