This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t/utf16_to_utf8.t: Avoid use of Encode
authorKarl Williamson <khw@cpan.org>
Tue, 13 Dec 2016 22:27:37 +0000 (15:27 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 13 Dec 2016 22:48:04 +0000 (15:48 -0700)
commit49cc4b7acb3fba07e5ad92c45a317ff03c8def00
tree62d937f9f4bc9b7446b502264cab752767a421fa
parent3d42f267c758a04ec4b71154cae8bdda102016dc
APItest/t/utf16_to_utf8.t: Avoid use of Encode

It's probably not a good idea to rely on a CPAN module's correctly
working to test something in core, but this does.  But it turns out that
there is a core equivalent to encoding UTF-8, utf8::encode(), which this
changes to use.  There are other uses of Encode here, but I don't have
the tuits to fix those.

The reason I'm fixing this at all, is that Encode 2.88 appears to have
broken encode("UTF-8") on EBCDIC platforms.  This change allows this to
be determined for sure, while removing one outside dependency from core.
ext/XS-APItest/t/utf16_to_utf8.t