Re: [GENERAL] plperl and regexps with accented characters - incompatible? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [GENERAL] plperl and regexps with accented characters - incompatible?
Date
Msg-id 473892A5.5090109@dunslane.net
Whole thread Raw
In response to Re: [GENERAL] plperl and regexps with accented characters - incompatible?  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [GENERAL] plperl and regexps with accented characters - incompatible?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers

Andrew Dunstan wrote:
>
>
>
> Greg Sabino Mullane wrote:
>>
>> Yes, we might want to consider making utf8 come pre-loaded for
>> plperl. There is no direct or easy way to do it (we don't have
>> finer-grained control than the 'require' opcode), but we could
>> probably dial back restrictions, 'use' it, and then reset the Safe
>> container to its defaults. Not sure what other problems that may
>> cause, however. CCing to hackers for discussion there.
>>
>>
>>
>
> UTF8 is automatically on for strings passed to plperl if the db
> encoding is UTF8. That includes the source text. Please be more
> precise about what you want.
>
> BTW, the perl docs say this about the utf8 pragma:
>
>       Do not use this pragma for anything else than telling Perl that
> your
>       script is written in UTF-8.
>
> There should be no need to do that - we will have done it for you. So
> any attempt to use the utf8 pragma in plperl code is probably broken
> anyway.
>
>

Ugh, in testing I see some nastiness here without any explicit require.
It looks like there's an implicit require if the text contains certain
chars. I'll see what I can do to fix the bug, although I'm not sure if
it's possible.

cheers

andrew

pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [hibernate-team] PostgreSQLDialect
Next
From: Gregory Stark
Date:
Subject: Re: Simplifying Text Search