develooper Front page | perl.libwww | Postings from September 2008

Re: Silent removed parameters when posting UTF8

Thread Previous | Thread Next
From:
Gisle Aas
Date:
September 20, 2008 23:36
Subject:
Re: Silent removed parameters when posting UTF8
The issue with dropped chars has been fixed so I don't worry about
that.  Just upgrade the URI module.

The remaining issue is if $url->query_form should accept Unicode data
and automatically UTF-8 encode it as it does now.  When I accepted
that patch I though it would be harmless as this provide a convenience
for some at the same time as it does not change anything for users
that properly encode their data before passing it to this API. What's
problematic is that this strengthens the idea that the UTF-8 flag has
semantic meaning at the Perl level.  Strings with chars in the range
128-255 behave differently depending on the internal representation.
I'm not happy about that.  It's certainly not my idea of a sane
Unicode model.

To me that leaves 2 options; either make the URI API strict and only
accept args that are bytes (strings that can be utf8::downgraded) or
just live with the ugliness of inconsistent Unicode model and try to
document the issues better over time. I'm leaning towards the later.

--Gisle

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About