diff options
author | Pali <pali@cpan.org> | 2016-09-18 17:44:22 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-02-06 20:09:23 -0700 |
commit | 016b3422ad385c1af7faa4f0a71c244fdf999e5c (patch) | |
tree | cda3c8d24b9c34530216eb995e662b3fda88181a | |
parent | 6d8e74506f971081362433e3d39fe2e4da9fb302 (diff) | |
download | perl-016b3422ad385c1af7faa4f0a71c244fdf999e5c.tar.gz |
perluniintro: Suggest to use utf8::decode() instead heavy Encode when sequence of bytes is valid UTF-8
-rw-r--r-- | pod/perluniintro.pod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod index 308113d6de..d0ed3a0579 100644 --- a/pod/perluniintro.pod +++ b/pod/perluniintro.pod @@ -817,8 +817,8 @@ pack/unpack to convert to/from Unicode. If you have a sequence of bytes you B<know> is valid UTF-8, but Perl doesn't know it yet, you can make Perl a believer, too: - use Encode 'decode_utf8'; - $Unicode = decode_utf8($bytes); + $Unicode = $bytes; + utf8::decode($Unicode); or: |