Subject: | suggest wide chars |
Date: | Fri, 14 Apr 2017 13:49:03 +1000 |
To: | bug-Time-Duration-es [...] rt.cpan.org |
From: | Kevin Ryde <user42_kevin [...] yahoo.com.au> |
It seems Time::Duration::es::duration() gives byte strings of utf8.
use Time::Duration::es;
my $str = Time::Duration::es::duration(100000);
print "$str\n";
print utf8::is_utf8($str) ? "wide\n" : "bytes\n";
=>
"bytes"
It could be desirable to give perl wide chars ready for character
manipulation, or output in a different encoding. That might be as easy
as "use utf8" at the start of the source (if you're happy to be perl 5.8
up or some such new enough version).