#!perl

our $DATE = '2016-11-01'; # DATE
our $VERSION = '0.002'; # VERSION

use strict;
use warnings;
use Data::Dmp;
use Encode;

for my $i (0..$#ARGV) {
    printf "%d\t%s\n", $i, dmp(map {Encode::decode('UTF-8', $_)} $ARGV[$i]);
}

# ABSTRACT: Print command-line arguments (as UTF-8 strings)
# PODNAME: print-argv-utf8

__END__

=pod

=encoding UTF-8

=head1 NAME

print-argv-utf8 - Print command-line arguments (as UTF-8 strings)

=head1 VERSION

This document describes version 0.002 of print-argv-utf8 (from Perl distribution App-CLITestUtils), released on 2016-11-01.

=head1 SYNOPSIS

 % print-argv-utf8 Hello 您好
 0       "Hello"
 1       "\x{60A8}\x{597D}"

=head1 DESCRIPTION

Like L<print-argv>, except that arguments will be converted from octets to
Unicode strings first. Compare the example in Synopsis when we're using
L<print-argv>:

 % print-argv Hello 您好
 0       "Hello"
 1       "\xE6\x82\xA8\xE5\xA5\xBD"

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/App-CLITestUtils>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-App-CLITestUtils>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-CLITestUtils>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 SEE ALSO

L<print-argv>

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut