| From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
|---|---|
| To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
| Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Subject: | Re: plperlu problem with utf8 |
| Date: | 2010-12-18 06:46:54 |
| Message-ID: | AANLkTi=AgYM4TFWNoW3FYmkEbVcqefm5EPEtN+_=8s1F@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Dec 17, 2010 at 18:22, David E. Wheeler <david(at)kineticode(dot)com> wrote:
> On Dec 17, 2010, at 5:04 PM, David E. Wheeler wrote:
>
>>> see? Either uri_unescape() should be decoding that utf8() or you need
>>> to do it *after* you call uri_unescape(). Hence the maybe it could be
>>> considered a bug in uri_unescape().
>>
>> Agreed.
>
> On second thought, no. You can in fact encode anything in a URI. URI::Escape can't know what to decode to. So *I believe* it just unescapes the raw bytes. It might be handy for it to have a new function, though, to complement its uri_escape_utf() function:
>
> sub uri_unescape_utf8 { Encode::decode_utf8(uri_unescape(@_)) }
>
> Just to make things a bit clearer.
>
> But that's a separate issue from the, erm, inconsistency with which PL/Perl treats encoding and decoding of its inputs and outputs.
Yay! So I think we can finally agree that for Oleg's original test
case postgres was getting right. I hope ? :)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alex Hunsaker | 2010-12-18 06:53:36 | Re: plperlu problem with utf8 |
| Previous Message | Alex Hunsaker | 2010-12-18 06:43:48 | Re: plperlu problem with utf8 |