Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

The “real length" of UTF8 strings

by Anonymous Monk
on Sep 23, 2008 at 20:04 UTC ( [id://713297]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MDevel::Peek -e 'use utf8; my $s="\x{5fcd}\x{65e0}\x{53ef}\x{5
    +fcd}"; Dump($s); print length($s), "\n";'
    SV = PV(0x8154b00) at 0x8154720
    ...
      LEN = 16
    4
    
  2. or download this
    $ perl -MDevel::Peek -e 'use utf8; my $s="(\x{5fcd}\x{65e0}\x{53ef}\x{
    +5fcd})"; Dump($s); print length($s), "\n";'
    SV = PV(0x8154b00) at 0x8154720
    ...
      LEN = 16
    6
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-03-28 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found