Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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??


in reply to Re: length() miscounting UTF8 characters?
in thread length() miscounting UTF8 characters?

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.

  • Comment on Re^2: length() miscounting UTF8 characters?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1084051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 13:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found