Mar 31, 2014, 12:51 AM
thanks Bill and others.
Re: [Laurent_R] truncating variable with charset
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)