|P is for Practical|
problem with chr functionby John M. Dlugosz (Monsignor)
|on Oct 25, 2002 at 18:27 UTC ( #208101=perlquestion: print w/replies, xml )||Need Help??|
John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
tells me "Malformed UTF-8 character (unexpected non-continuation byte 0x00 after start byte 0xc0) in pattern match (m//)"
As documented in perlfunc, chr seems to take Unicode characters just fine, producing legal UTF-8 for most values, but for some reason is working wrong for arguments in the range 191 through 255.
Here is more proof:
90 - 90 192 - 192 257 - 196.129 9786 - 226.152.186Note that 192 maps to a single 192 byte, not 195.128.
Back to Seekers of Perl Wisdom