Don't ask to ask, just ask | |
PerlMonks |
Re^2: length() miscounting UTF8 characters?by AppleFritter (Vicar) |
on Apr 27, 2014 at 22:08 UTC ( [id://1084051]=note: print w/replies, xml ) | Need Help?? |
Yes, simply dividing by two would work here (and that's what I've been doing, mentally), but that's only because all the non-English characters encountered here are encoded as two bytes in UTF8. As soon as there'd be 3- or 4-byte characters, it'd not work anymore. Thanks for your help! I'll take a look at that module.
In Section
Seekers of Perl Wisdom
|
|