Mar 31, 2014, 12:51 AM
Post #7 of 7
thanks Bill and others.
Re: [Laurent_R] truncating variable with charset
[In reply to]
Bill, your program works, but not entirely as expected.
substring doesn't cut properly utf8, so I found this workaround:
my $valid = Encode::decode('utf8', $sstr, Encode::FB_QUIET);
$sstr = Encode::encode('utf8', $valid);
(This post was edited by orange on Apr 7, 2014, 10:03 AM)