Text::Homoglyph

Map ASCII to unicode homoglyphs.

Text::Homoglyph

Perl6 package for mapping ASCII characters to unicode homoglyphs (similar looking characters)

Data

The data was pinched and modified from the super evil https://github.com/reinderien/mimic Several gaps were filled in with http://shapecatcher.com please feel free to extend and improve the character mapping. Some obvious improvements can be made by completing full ranges like the maths letters. More work needs to be done on curating the "best" looking unicode homoglyph as the first in the list.

N.b. the very first character returned is the ASCII character

Example Use

#!/usr/bin/env perl6
use v6;

use Text::Homoglyph;

say "Woohoo this is some nice text".comb.map({(rand > 0.8)?? $_ !! homoglyphs($_)[1] }).join;

釒澄课恳晃縪聽饾棈一i褧聽褨s 褧慰鈪啃德爊i喜械聽饾棈e褏饾棈

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.