perlquestion
morgon
Hi,<p>
say I have an utf-8 encoded string that I want to truncate to a certain number of bytes.<p>
So I am looking for the longest substring that - when encoded as utf-8 takes less than a certain number of bytes.<p>
What is the best way to do this?<p>
Many thanks!