The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Basis::ConvertText2::UtfTransform

SYNOPSIS

    use 5.10.0 ;
    use strict ;
    use warnings ;
    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>
    :beer:
    :)
    ;)

    " ;

    say utf_transform( $string) ;

DESCRIPTION

A number of popular websites (eg twitter) do not allow the use of HTML to create bold/italic font effects.

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, bold, italic, bubbles and leet.

We can transform A-Z a-z 0-9 and ? ! ,

Smilies

I have only implemented a small set of smilies, ones that I am likely to use

    <3            heart
    :heart:       heart
    :)            smile
    :D            grin
    8-)           cool
    :P            pull tongue
    :(            cry
    :(            sad
    ;)            wink
    :halo:        halo
    :devil:       devil horns
    :horns:       devil horns
    (c)           copyright
    (r)           registered
    (tm)          trademark
    :email:       email
    :yes:         tick
    :no:          cross
    :beer:        beer
    :wine:        wine
    :wine_glass:  wine
    :cake:        cake
    :star:        star
    :ok:, :yes:, :thumbsup:    thumbsup
    :bad:, :no:, :thumbsdown:  thumbsup
    :ghost:       ghost
    :skull:       skull
    :hourglass:   hourglass
    :time:        watch face
    :sleep:

See Also http://txtn.us/