]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Statement.pl
avoid reassigning to temp upon decode_utf8
[infobot.git] / src / Factoids / Statement.pl
index b7cb0a79937a53c121e4be64a52fa81976e595b0..1cc50cb98c47a7fa6e1e4dbe2feb8ba021f999c2 100644 (file)
@@ -119,8 +119,8 @@ sub doStatement {
         # characters.
         ### this can be simplified.
         for my $temp ($lhs,$rhs ) {
-           $temp = decode_utf8($temp);
-           if ($temp =~ /([^[:print:]])/ or $temp =~ /\N{U+FFFD}/) {
+           my $temp2 = decode_utf8($temp);
+           if ($temp2 =~ /([^[:print:]])/ or $temp2 =~ /\N{U+FFFD}/) {
                &status("statement: illegal character '$1' ".ord($1).".");
                 &performAddressedReply(
                     "i'm not going to learn illegal characters");