As
moritz pointed out above, the issue is not 32- vs, 64-bit cpu, but rather the OS and/or perl version and/or locale setup and/or how perl was built on each machine and/or the nature of the data in your "production" vs. "other" environments, etc. (If the actual source code file happens to differ in the production vs. other environments, well, such differences are obviously of interest...)
A quick-and-dirty work-around to make the two environments behave the same way is to make your utf8::decode($string) call conditional on whether $string has it's "utf8 flag" set.
The involves the is_utf8 function, which is mentioned in the utf8 manual, which in turn refers you to the more detailed description in the Encode manual, under the section "Messing with Perl's Internals" (you should take note of the caveats mentioned in both manuals):
utf8::decode( $string ) unless ( utf8::is_utf8( $string ));
(update: fixed missing close-paren)
BTW, if, as suggested in the OP, you are actually passing a quoted string to utf8::decode(); this would be quite pointless and counter-productive if your source code has use utf8 in it, and the quoted string happens to actually be a utf8 string in the source code.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.