Hi!

So, I've got this legacy system running perl 5.6.something on a server I only have ftp access to. I haven't got perl 5.6 running anywhere to test stuff (or even read the docs). Now they need to parse an utf8-encoded RSS stream (which gets stored into the DB for further processing - don't ask...)

How do I decode a utf8 string in perl 5.6 to some iso-8859-* ?

Encode is not installed, utf8::decode doesn't work either. Encode requires 5.7.3, so it's not an option. Hmm, personally I would love to have them update to 5.8 but OTOH it's quite a hassle (recompile mod_perl, reinstall half of CPAN, ...)

Any hints, anyone?

-- #!/usr/bin/perl for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

In reply to utf8 and perl 5.6 by domm

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.