> What is this code trying to do? It's not obvious to me. Sorry, Nick. It's trying to get $_ to hold a fully Unicode- enabled character for purposes of pattern matches against it. I need \s \w etc to work correctly on it, including across the problematic Latin1 range of 128..255. >> # fixes "the Unicode bug" >> unless (utf8::is_utf8($_)) { >> $_ = decode("iso-8859-1", $_); >> } > And (unless I'm missing something) the code as-is *isn't* > flipping the internal flag, so there's no way it can leave > internal structures in an inconsistent state. I misunderstood what was being discussed. I thought it was all utf8:: functions, including even is_utf8, but rereading it appears that it's the underbarred _utf8_on and _utf8_off functions that are the problem, where people go flipping the utf8 bit no matter what the contents really are. I knew that those would do me no good here. I'm glad to learn that I'm actually playing by the rules. --tomThread Previous | Thread Next