]> git.donarmstrong.com Git - infobot.git/commitdiff
avoid reassigning to temp upon decode_utf8 dpkg
authorDon Armstrong <don@donarmstrong.com>
Sat, 30 Dec 2017 19:29:15 +0000 (11:29 -0800)
committerDon Armstrong <don@donarmstrong.com>
Sat, 30 Dec 2017 19:29:39 +0000 (11:29 -0800)
- Failing to do causes $rhs/$lhs to be UTF8 decoded for some reason
  that I don't understand completely

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");