Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Transform ASCII into UniCode

by Polyglot (Friar)
on Mar 23, 2021 at 03:52 UTC ( #11130176=note: print w/replies, xml ) Need Help??


in reply to Transform ASCII into UniCode

use utf8; use Encode qw(encode decode); my $CharSet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012 +3456789'; # ASCII my $BoldSet = encode('utf8','𝐚𝐛𝐜𝐝&#119 +838;𝐟𝐠𝐡𝐢𝐣𝐤𝐥&# +119846;𝐧𝐨𝐩𝐪𝐫𝐬&#119853 +;𝐮𝐯𝐰𝐱𝐲𝐳𝐀&#119 +809;𝐂𝐃𝐄𝐅𝐆𝐇𝐈&# +119817;𝐊𝐋𝐌𝐍𝐎𝐏&#119824 +;𝐑𝐒𝐓𝐔𝐕𝐖𝐗&#119 +832;𝐙𝟎𝟏𝟐𝟑𝟒𝟓&# +120788;𝟕𝟖𝟗'); my $Source = 'The quick brown fox jumps over the lazy dog 1234567890 t +imes.'; my $Target = $Source; $Target =~ tr/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123 +456789/𝐚𝐛𝐜𝐝𝐞𝐟&#119840 +;𝐡𝐢𝐣𝐤𝐥𝐦𝐧&#119 +848;𝐩𝐪𝐫𝐬𝐭𝐮𝐯&# +119856;𝐱𝐲𝐳𝐀𝐁𝐂&#119811 +;𝐄𝐅𝐆𝐇𝐈𝐉𝐊&#119 +819;𝐌𝐍𝐎𝐏𝐐𝐑𝐒&# +119827;𝐔𝐕𝐖𝐗𝐘𝐙&#120782 +;𝟏𝟐𝟑𝟒𝟓𝟔𝟕&#120 +790;𝟗/; print "$Source\n$Target\n"; #The quick brown fox jumps over the lazy dog 1234567890 times. #𝐓𝐡𝐞 𝐪𝐮𝐢𝐜&#119 +844; 𝐛𝐫𝐨𝐰𝐧 𝐟𝐨 +𝐱 𝐣𝐮𝐦𝐩𝐬 𝐨&#11 +9855;𝐞𝐫 𝐭𝐡𝐞 𝐥&#119834 +;𝐳𝐲 𝐝𝐨𝐠 𝟏𝟐&#1 +20785;𝟒𝟓𝟔𝟕𝟖𝟗𝟎 + 𝐭𝐢𝐦𝐞𝐬.

Blessings,

~Polyglot~

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (None)
    As of 2022-01-26 06:19 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      In 2022, my preferred method to securely store passwords is:












      Results (69 votes). Check out past polls.

      Notices?