Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to convert between Unicode codepoint and UTF8 character code on Perl?

by ikegami (Patriarch)
on Oct 25, 2021 at 15:40 UTC ( [id://11138021]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Encode qw( encode_utf8 );
    
    ...
    }{
       "0x" . uc(unpack("H*", encode_utf8(chr(hex($1)))))
    }xe;
    
  2. or download this
    use Encode qw( decode_utf8 );
    
    ...
    }{
       sprintf("U+%X", ord(decode_utf8(pack("H*", $1))))
    }xe;
    

Log In?
Username:
Password:

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

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

    No recent polls found