App-Basis-ConvertText2-UtfTransform
view release on metacpan or search on metacpan
my $program = get_program();
my %opt = init_app(
help_text => "Convert ascii text into UTF8 to simulate text formatting",
help_cmdline => "text string or strings to transform",
options => {}
);
# make sure we are processing utf properly for output
binmode(STDOUT, ":utf8");
say utf_smilies( utf_transform( join( " ", @ARGV ) )) ;
lib/App/Basis/ConvertText2/UtfTransform.pm view on Meta::CPAN
use App::Basis::ConvertText2::UtfTransform
my $string = "<b>bold text</b>
<i>italic text</i>
<f>flipped upside down text and reversed</f>
<l>Some Leet speak</l>
<o>text in bubbles</o>
<s>script text</s>
<l>are you leet</l>" ;
say utf_transform( $string) ;
my $smile = ":beer: is food! :) I <3 :cake: ;)" ;
say uttf_smilies( $smile ) ;
=head1 DESCRIPTION
A number of popular websites (eg twitter) do not allow the use of HTML to create
bold/italic font effects or perform smily transformations
However we can simulate this with some clever transformations of plain ascii text
into UTF8 codes which are a different font and so effectively create the same effect.
We have transformations for flip (reverses the string and flips upside down,
( run in 1.588 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )