=pod

=encoding utf8

=head1 NAME

urldecode - an URL-decoding utility

=head1 SYNOPSIS

urldecode arg...

=head1 DESCRIPTION

The utility decodes any argument by replacing percent encoded triplets
with the corresponding character.

If there are no arguments, or if the only argument is C<-> (dash),
then the utility decodes stdin to stdout.  When decoding arguments
to stdout, the utility also decodes numeric HTML references (&#NNN).

Decoded words are put on standard output, terminated by newlines.

No attempt is made to check arguments' validity.  Badly encoded
arguments result in rubbish out.

=head1 EXAMPLES

    urldecode user%40example.org
    user@example.com

    urldecode 'U+2020 is &#8224'
    U+2020 is †

    cmp="$(head -c 20 < /dev/urandom | tr -cd '[:print:]')"
    test "$cmp" = "$(urldecode $(urlencode "$cmp"))" && echo ok
    ok

=head1 AUTHOR

Alessandro Vesely E<lt>vesely@tana.itE<gt>

=head1 SEE ALSO

=over

=item B<urlencode>(1)

=back

=cut

