Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Transform ASCII into UniCode

by Polyglot (Chaplain)
on Mar 23, 2021 at 03:52 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found