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

Re: bytea on windows perl client

From: Joe Conway <mail(at)joeconway(dot)com>
To: James Orr <james(at)lrgmail(dot)com>
Cc: Jeremy Buchmann <jeremy(at)wellsgaming(dot)com>,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: bytea on windows perl client
Date: 2002-07-17 19:09:35
Message-ID: (view raw or whole thread)
Lists: pgsql-interfaces
James Orr wrote:
> On Wednesday 17 July 2002 01:17 pm, Jeremy Buchmann wrote:
>>>>\211PNG\015\012\000 and so on.
>>>This is the escaped output form of bytea. It seems that on linux the
>>>perl script is either using a binary cursor, or automagically
>>>unescaping the output, while on windows it isn't. I'm not sure why that
>>>would happen, but hopefully one of the perl gurus hanging around will
>>>chime in.
>>This may be a long shot, but try to binmode your output stream:
>>Let us know how it works.
> I did this ...
> print "Content-type: image/png\n\n";
> binmode STDOUT;
> print $image;
> Didn't work.

Does perl (or one of the available libraries) have a function like PHP's 
stripcslashes()? See:

If so, you should be able to do something like:

print "Content-type: image/png\n\n";
print stripcslashes($image);



In response to

pgsql-interfaces by date

Next:From: Rick GregoryDate: 2002-07-18 13:01:50
Subject: Re: Building LPQ and LPQ++ libraries for Windows
Previous:From: James OrrDate: 2002-07-17 17:37:16
Subject: Re: bytea on windows perl client

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group