Hi all, I've got some code that I'm trying to make usable with as many user setups as possible, and I've run into an odd problem. The first code block below does what it ought (uppercase $_) in 5.005_04, 5.6.0, 5.8.4, 5.8.5 and 5.8.10, but in 5.6.1 and 5.6.2 it turns 'Hello World' into
Hó¿¼ÃÃÃ
WÃÃÃó¿¼
The second, largely identical, code block works fine in 5.6.[12], but that doesn't really explain why things have gone awry.
tr/a-z\x{fff03}-\x{fff05}\x{e0}-\x{f6}\x{f8}-\x{fe}\x{ff}\x{103}\x{105 +}\x{107}\x{109}\x{10b}\x{10d}\x{10f}\x{103}\x{105}\x{117}\x{119}\x{11 +b}\x{11d}\x{11f}\x{103}\x{105}\x{127}\x{129}\x{12b}\x{12d}\x{12f}\x{1 +33}\x{135}\x{137}\x{13a}\x{13c}\x{13e}\x{140}\x{142}\x{144}\x{146}\x{ +148}\x{14b}\x{14d}\x{14f}\x{151}\x{153}\x{155}\x{157}\x{159}\x{15b}\x +{15d}\x{15f}\x{161}\x{163}\x{165}\x{167}\x{169}\x{16b}\x{16d}\x{16f}\ +x{171}\x{173}\x{175}\x{177}\x{17a}\x{17c}\x{17e}/A-Z\x{fff00}-\x{fff0 +2}\x{c0}-\x{d6}\x{d8}-\x{de}\x{178}\x{102}\x{104}\x{106}\x{108}\x{10a +}\x{10c}\x{10e}\x{102}\x{104}\x{116}\x{118}\x{11a}\x{11c}\x{11e}\x{10 +2}\x{104}\x{126}\x{128}\x{12a}\x{12c}\x{12e}\x{132}\x{134}\x{136}\x{1 +39}\x{13b}\x{13d}\x{13f}\x{141}\x{143}\x{145}\x{147}\x{14a}\x{14c}\x{ +14e}\x{150}\x{152}\x{154}\x{156}\x{158}\x{15a}\x{15c}\x{15e}\x{160}\x +{162}\x{164}\x{166}\x{168}\x{16a}\x{16c}\x{16e}\x{170}\x{172}\x{174}\ +x{176}\x{179}\x{17b}\x{17d}/;
tr/a-z/A-Z/;tr/\x{fff03}-\x{fff05}\x{e0}-\x{f6}\x{f8}-\x{fe}\x{ff}\x{1 +03}\x{105}\x{107}\x{109}\x{10b}\x{10d}\x{10f}\x{103}\x{105}\x{117}\x{ +119}\x{11b}\x{11d}\x{11f}\x{103}\x{105}\x{127}\x{129}\x{12b}\x{12d}\x +{12f}\x{133}\x{135}\x{137}\x{13a}\x{13c}\x{13e}\x{140}\x{142}\x{144}\ +x{146}\x{148}\x{14b}\x{14d}\x{14f}\x{151}\x{153}\x{155}\x{157}\x{159} +\x{15b}\x{15d}\x{15f}\x{161}\x{163}\x{165}\x{167}\x{169}\x{16b}\x{16d +}\x{16f}\x{171}\x{173}\x{175}\x{177}\x{17a}\x{17c}\x{17e}/\x{fff00}-\ +x{fff02}\x{c0}-\x{d6}\x{d8}-\x{de}\x{178}\x{102}\x{104}\x{106}\x{108} +\x{10a}\x{10c}\x{10e}\x{102}\x{104}\x{116}\x{118}\x{11a}\x{11c}\x{11e +}\x{102}\x{104}\x{126}\x{128}\x{12a}\x{12c}\x{12e}\x{132}\x{134}\x{13 +6}\x{139}\x{13b}\x{13d}\x{13f}\x{141}\x{143}\x{145}\x{147}\x{14a}\x{1 +4c}\x{14e}\x{150}\x{152}\x{154}\x{156}\x{158}\x{15a}\x{15c}\x{15e}\x{ +160}\x{162}\x{164}\x{166}\x{168}\x{16a}\x{16c}\x{16e}\x{170}\x{172}\x +{174}\x{176}\x{179}\x{17b}\x{17d}/;
The problem actually seems to persist with any subset of the hex translations in parallel with the ASCII e.g;
tr/a-z\x{fff03}-\x{fff05}/A-Z\x{fff00}-\x{fff02}/;

--
In Bob We Trust, All Others Bring Data.


In reply to tr funkiness in 5.6.[12] (but not 5.6.0!) by belg4mit

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.