=head1 NAME Web::URL::Encoding - URL percent encoding and application/x-www-form-urlencoded =head1 SYNOPSIS use Web::URL::Encoding; warn percent_encode_c $text; warn serialize_form_urlencoded { $name => $value, $name => [$value1, $value2], }; =head1 DESCRIPTION The C module exports a function for the percent-encoding and the C encoding. =head1 FUNCTIONS The following functions are exported by default: =over 4 =item $bytes = percent_encode_c $text Percent-encode the string, encoded in UTF-8. Anything other than C<[A-Za-z0-9_.-]> are percent-encoded. =item $text = percent_decode_c $bytes Percent-decode the bytes and then decode as a UTF-8 string. =item $bytes = percent_decode_b $bytes Percent-decode the bytes and return the result bytes. =item $bytes = oauth1_percent_encode_c $text Percent-encode the string, encoded in UTF-8, for OAuth 1.0. =item $bytes = oauth1_percent_encode_b $text Percent-encode the bytes, for OAuth 1.0. =item $bytes = serialize_form_urlencoded $params Serialize a hash reference as an C bytes. The argument must be a hash reference where keys are names of the encoded form data set and values are corresponding values. If the value is C, that key/value pair is ignored. If the value is an array reference, the items in the array are used as values of name/value pairs with same name. The order is preserved. The array can be empty. The values are encoded in UTF-8. =back =head1 SPECIFICATIONS URL Standard . RFC 5849, The OAuth 1.0 Protocol . When a text is encoded in UTF-8, "UTF-8 encode" steps of the Encoding Standard MUST be used. Encoding Standard . =head1 SEE ALSO SuikaWiki:percent-encoding . =head1 HISTORY The module partially derived from L and L and L from . =head1 AUTHOR Wakaba . =head1 LICENSE Copyright 2009-2013 Hatena . Copyright 2014-2016 Wakaba . This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut