These people seem to be running fairly modern versions of everything (e.g., Red Hat 9 and perl 5.8.0).

I'm sorry, but these days, RH-9 and perl 5.8.0 are not that current, and on top of that, this particular combination has some known problems that stem from the fact that perl's treatment of file i/o was dependent on the user's locale environment. From the "Perl 5.8.1 Official Announcement":

UTF-8 On Filehandles No Longer Activated By Locale

In Perl 5.8.0 all filehandles, including the standard filehandles, were implicitly set to be in Unicode UTF-8 if the locale settings indicated the use of UTF-8. This feature caused too many problems, so the feature was turned off and redesigned...

The problems involved getting a lot of mayhem from existing apps, which folks were expecting should have ported seemlessly from 5.6 or earlier, and had nothing to do with unicode data. They broke because instead of reading data "as-is", the user's default locale setting (which on RH9 involved utf8) was treating any sort of non-ascii data as something unexpected, usually producing "malformed utf8" errors.

I think the best fix might be to put "use bytes" at the top of the script (assuming this is appropriate) -- though I'm not sure if this is always adequate. Another idea would be to check the perl version and OS, and if it's 5.8.0 on RH9, apply binmode ":raw" on file handles, to disable the treatment of file i/o as utf8 (assuming this is appropriate).

You'll still need someone with that combo to serve as a beta tester. Someone might be willing to give you a user account on such a box, and if so, you can debug on your own. But short of that, package up a minimal app and test data that would demonstrate the problem you need to fix, and ask a beta tester with the target setup to run it and send you back the output. Iterate till you get it solved. (Bummer)


In reply to Re: approaches to debugging a platform-dependant bug by graff
in thread approaches to debugging a platform-dependant bug by bcrowell2

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.