Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Losing Bits with Pack/Unpack

by BillKSmith (Monsignor)
on Sep 18, 2020 at 15:27 UTC ( [id://11121926]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my $_hex_text = sprintf '%X' x scalar(@_code_points), @_code_points;
    my $_text = pack 'H*', $_hex_text;
    print $_text;
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    is($_text, $text, 'Restored text');
    
  3. or download this
    1..2
    ok 1 - Number of Unicode characters
    ok 2 - Restored text
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found