X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=uniencode;fp=uniencode;h=41b98d920e0ad36387b3e2affd790d497acae192;hb=b319174e635b3d676f43cb884c981b768fe4b4e4;hp=0000000000000000000000000000000000000000;hpb=f81721f8c2ea34ae1d69360ef66546a79f1c11f7;p=filters.git diff --git a/uniencode b/uniencode new file mode 100755 index 0000000..41b98d9 --- /dev/null +++ b/uniencode @@ -0,0 +1,116 @@ +#!/usr/bin/perl +# Ⅽоηνеrt аѕⅽіі tօ υtf‐8. +use utf8; +binmode STDOUT, ":utf8"; + +%Δ=( +"~" => [], +"!" => [], +"@" => [], +"#" => [], +'$' => [], +"%" => [8240], +"^" => [], +"&" => [], +"*" => [10033], +"(" => [], +")" => [], +"_" => [9418], +"-" => [8208], +"+" => [], +"=" => [], +"[" => [], +"]" => [], +"{" => [], +"}" => [], +'\\' => [], +"|" => [9475], +'"' => [8223], +"'" => [8217], +":" => [], +";" => [], +"<" => [8249], +">" => [8250], +"," => [], +"." => [], +"/" => [8260], +"?" => [], + +"1" => [], +"2" => [], +"3" => [1047], +"4" => [], +"5" => [], +"6" => [], +"7" => [], +"8" => [], +"9" => [], +"0" => [1365], + +"a" => [1072], +"b" => [1068], +"c" => [1089, 8573, 1010], +"d" => [1281, 8574], +"e" => [1077], +"f" => [], +"g" => [], +"h" => [1210], +"i" => [1110, 8560], +"j" => [1011, 1112], +"k" => [], +"l" => [8572], +"m" => [8575], +"n" => [951, 627], +"o" => [1086, 1413], +"p" => [961, 1088], +"q" => [], +"r" => [], +"s" => [1109], +"t" => [], +"u" => [965], +"v" => [957, 8910, 8964, 9013], +"w" => [], +"x" => [1093, 8569, 215], +"y" => [1059, 1091], +"z" => [], + +"A" => [1040], +"B" => [1042], +"C" => [663, 1057, 8557], +"D" => [8558], +"E" => [917, 1045], +"F" => [988], +"G" => [1292], +"H" => [919, 1053], +"I" => [921, 1030], +"J" => [1032], +"K" => [922, 1050], +"L" => [8556], +"M" => [924, 1052, 8559], +"N" => [925], +"O" => [927, 1054], +"P" => [929, 1056], +"Q" => [], +"R" => [], +"S" => [1359], +"T" => [932, 1058], +"U" => [], +"V" => [947, 8548], +"W" => [], +"X" => [935], +"X" => [935, 1061, 8553], +"Y" => [933], +"Z" => [918], +); + +while (<>) { + foreach $ם (split //) { + if (exists $Δ{$ם} && @{$Δ{$ם}}) { + @ה=@{$Δ{$ם}}; + print chr($ה[rand @ה]); + } + else { + print $ם + } + } +}