Acme::Unicodify - Convert ASCII text into look-somewhat-alike unicode
version 0.008
my $translate = Acme::Unicodify->new();
$foo = $translate->to_unicode('Hello, World');
$bar = $translate->back_to_ascii($unified_string);
file_to_unicode('/tmp/infile', '/tmp/outfile');
file_back_to_ascii('/tmp/infile', '/tmp/outfile');
This is intended to translate basic 7 bit ASCII into characters that use several Unicode features, such as accent marks and non-Latin characters. While this can be used just for fun, a better use perhaps is to use it as part of a test suite, to allow you to easily pass in Unicode and determine if your system handles Unicode without corrupting the text.
Create a new instance of the Unicodify object.
Takes an input string and translates it into look-alike Unicode characters. Input is any string.
Basic ASCII leters are translated into Unicode "look alikes", while any character (Unicode or not) is passed through unchanged.
Takes an input string that has perhaps previously been produced
by to_unicode
and translates the look-alike characters back
into 7 bit ASCII. Any other characters (Unicode or ASCII) are
passed through unchanged.
This method reads the file with the named passed as the first argument, and produces a new output file with the name passed as the second argument.
The routine will call to_unicode
on the contents of the file.
Note this will overwrite existing files and it assumes the input and output files are in UTF-8 encoding (or plain ASCII in the case that no codepoints >127 are used).
This also assumes that there is sufficient memory to slurp the entire contents of the file into memory.
This method reads the file with the named passed as the first argument, and produces a new output file with the name passed as the second argument.
The routine will call back_to_ascii
on the contents of the file.
Note this will overwrite existing files and it assumes the input and output files are in UTF-8 encoding (or plain ASCII in the case that no codepoints >127 are used).
Joelle Maslak jmaslak@antelope.net
This software is copyright (c) 2015,2016,2017 by Joelle Maslak.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.