Unicode has been torturing me for about a decade I guess.

I have read everything about it in perldoc and in various module's man pages, several times, but it's just too much. Every time, I have to re-read the docs and try many different things before it somehow works for one specific problem. Next time, something is different, and the whole reading-trying cycles start again. It drives me mad.

Isn't there a simple cheat sheet or diagram somewhere which would help me find the solution faster?

My current specific problem is:

The output is UTF8!

(I didn't expect having a Unicode problem this time, since everything is Latin1)

Using the same script with the same input file on another machine with a UTF8 locale and Perl 5.10, the output is Latin1!! Probably just to annoy me, some gremlin goes to great lengths to ensure I get the wrong output...

The great solution which I dream of is a web form where I input my specifics (perl version, input source and encoding, wanted output destination and encoding), and get the answer of what I need to do (which module to load, when to decode or encode, etc.).


In reply to Unicode nightmare: is there a cheat sheet or solutions diagram? by rduke15

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.