Re: plperlu problem with utf8

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: plperlu problem with utf8
Дата
Msg-id B248634C-B273-4871-86F6-E809E9E4D41B@kineticode.com
обсуждение исходный текст
Ответ на Re: plperlu problem with utf8  ("David E. Wheeler" <david@kineticode.com>)
Ответы Re: plperlu problem with utf8  (Alex Hunsaker <badalex@gmail.com>)
Список pgsql-hackers
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
andoutputs. 

Best,

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: plperlu problem with utf8
Следующее
От: andreas
Дата:
Сообщение: Tab completion for ALTER ... SET SCHEMA