Dear monks!

At work, we are finally moving to a new (to us) platform. We are going to leave perl 5.8.5 behind us and move our home-grown webapp-framework to 5.10.1. That also means exchanging mod_perl 1 on Apache 1.3 with mod_perl 2 on Apache 2.2. Our initial tests are looking good, but it seems that every utf8 string is broken in pages rendered in the new environment.

Some debugging tells me that my raw strings (which come from a variety of sources) don't have the utf8-flag set. When I run them through Encode::decode_utf8 or utf8::decode, I get broken UTF8. When I do a utf8::upgrade, they come out just fine. Needless to say, that our code base has lots and lots of calls to Encode::decode_utf8.

I've been reading through perldelta and everything referenced there, but I couldn't find anything that would really fit.

Of course, all the CPAN modules we use also get updated to their latest versions, but installing some candidates (HTML::Template, e.g.) on the old test system did not replicate the behavior we are seeing on the new one.

Can anyone help and direct me towards that silver bullet?

Update: solved, see below.

In reply to UTF-8 trouble moving from perl 5.8.5 to 5.10.1 by manni

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.