Thanks everyone for your replies. The problem was in my code, specifically that I was at one point in the code generating a character value greater than 255. This was unintentional, and I throw myself at the mercy of the Perl Monks for my transgressions against software engineering.
What led to the solution was the comment someone made about 'chr(999)'. My Unicode-challenged brain saw that and realized that I might accidentally be generating invalid character codes. So I wrote a loop over the string and had it dump out any characters that weren't 0 to 255. And there it was-- I had, essentially, inserted chr(0x4094) in a string I created.
Still, I'm still curious if there is some way I can force Perl into a pre-Unicode state. My guess is that in the past, attempting to give chr() an argument greater than 255 would have resulted in an fatal error (or at least warning) that would have tipped me off to the problem. The advice I've been given here (and the documentation I've read) talks about Unicode support in Perl at different phases-- when reading Perl source code, when reading strings from files opened with a Unicode encoding, when comparing strings and characters, when writing to files, and probably other times as well. So to be clear, what I'd like is the One Ring That Will Rule Them All-- the incantation that tells Perl, "please turn it ALL off."
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|