Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Encoding Decoding on multiple formats RFC

by thanos1983 (Priest)
on Sep 21, 2017 at 08:39 UTC ( #1199810=note: print w/replies, xml ) Need Help??


in reply to Re: Encoding Decoding on multiple formats RFC
in thread Encoding Decoding on multiple formats RFC

Hello AppleFritter,

Thank you for time and effort reading and replying to my request for comments. Hmmmm Unicode::Peek not a bad idea, it is exactly as you describe. The module meant to take a quick peek on the encoding. Well since I am also converting into hex why not Unicode::HexPeek?

Regarding the code tags, as fellow Monk hippo said I am using the <pre></pre> tags to encode the UTF-8 data.

Again thanks for the interesting ideas, I appreciate it. BR / Thanos

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^3: Encoding Decoding on multiple formats RFC
by kcott (Chancellor) on Sep 21, 2017 at 09:28 UTC

    G'day Thanos,

    "... using the <pre></pre> tags to encode the UTF-8 data."

    That's quite correct to do that!

    You also need to replace special characters with entities:

    ForReplaceWith
    HTML&&amp;
    <&lt;
    >&gt;
    PerlMonks[&#91;
    ]&#93;

    [The "HTML" ones are generic (i.e. not just for this site); The "PerlMonks" ones are specific to this site to prevent automatic link generation.]

    These appear under the textarea when you're composing your message:

    "You may need to use entities for some characters, as follows. ..."

    Unfortunately, that list is no longer there when previewing, nor when editing after node creation.

    — Ken

      Hello kcott

      Thanks for the tip, it worked perfectly.

      Best Regards, Thanos

      Seeking for Perl wisdom...on the process of learning...not there...yet!
Re^3: Encoding Decoding on multiple formats RFC
by AppleFritter (Vicar) on Sep 21, 2017 at 09:52 UTC

    Well since I am also converting into hex why not Unicode::HexPeek?

    That also works. Personally I'd not get too specific however; perhaps you'll find yourself wanting to expand the module beyond hexadecimal "peeking" further down the road. Best not to paint oneself into a corner too early!

      Hello AppleFritter,

      You are absolutely right. Why to produce a dead lock to your self when you are just creating the module. Unicode::Peek it is. :D

      Thanks again for the time and effort.

      Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199810]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2018-01-18 09:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (208 votes). Check out past polls.

    Notices?