"Mark Wagner" schreef: > I've got a program where I could greatly simplify things by > temporarily replacing strings with single characters. However, the > potential input includes any valid Unicode character. Assuming that > the invalid characters are never output to anything, are there any > problems that I'd encounter from using code points beyond what Unicode > defines (0x110000 and above)?
$ perl -wle' $i = "0xFD"; while (1) { $h = hex($i); $c = chr($h); last if $h != ord($c); substr($i, 2, 0, "F"); } printf "--> %s\n", $i; ' Integer overflow in hexadecimal number at -e line 4. Hexadecimal number > 0xffffffff non-portable at -e line 4. Unicode character 0xffffffff is illegal at -e line 5. --> 0xFFFFFFFFD See also pack()/unpack(). -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/