Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4

From: Alex Hunsaker <badalex(at)gmail(dot)com>
To: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4
Date: 2010-02-19 16:30:08
Message-ID: 34d269d41002190830n7d327878j1ef01a4854639192@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Feb 19, 2010 at 06:06, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> wrote:
> I've got the patch to Safe ready but the more I think about it the more
> I think the right fix is for Safe to automatically fully load utf8.pm
> (and utf8_heavy.pl) and to always share SWASHNEW itself.

It seems cleaner if we could just share say utf8::VERSION. SWASHNEW
seems likely to be changed as it "feels" more like a implementation
detail. But if thats what utf8 checks... well then thats what it
checks.

> Assuming perl5-porters agree then the next release of Safe will do that
> ad this patch won't be needed. (Other than it possibly being worthwhile
> to detect the 'bad' versions of Safe.)

It seems safer if there was some way to 'opt' in say if utf8 was
loaded then make safe do the above. Or maybe a pragma? use utf8
qw(utf8); We would still have to patch postgres... But I can
imagine there are some users of utf8 that dont want utf8 strings. BTW
as I could not reproduce this does this mean that reval->('"\x{}...")
works while reval->('sub { "\x{}"}') does not ? Or is it before the
first one failed while the closure based one worked?

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Hunsaker 2010-02-19 16:32:38 Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4
Previous Message Alex Hunsaker 2010-02-19 16:18:01 Re: BUG #5334: Version 2.22 of Perl Safe module breaks UTF8 PostgreSQL 8.4