From ae1e30051d6d45dbcf1f36940885fe98acba2065 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 14 Nov 2017 15:30:05 -0800 Subject: [PATCH] Allow UTF in output again --- PBot/Utils/ValidateString.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Utils/ValidateString.pm b/PBot/Utils/ValidateString.pm index 1dc3e5ea..ca5cfddf 100644 --- a/PBot/Utils/ValidateString.pm +++ b/PBot/Utils/ValidateString.pm @@ -10,7 +10,7 @@ sub validate_string { return $string if not defined $string or not length $string; $max_length = 2000 if not defined $max_length; $string = substr $string, 0, $max_length unless $max_length <= 0; - $string =~ s/(\P{PosixGraph})/my $ch = $1; if ($ch =~ m{[\s\x03\x02\x1d\x1f\x16\x0f]}) { $ch } else { sprintf "\\x%02X", ord $ch }/ge; +# $string =~ s/(\P{PosixGraph})/my $ch = $1; if ($ch =~ m{[\s\x03\x02\x1d\x1f\x16\x0f]}) { $ch } else { sprintf "\\x%02X", ord $ch }/ge; $string = substr $string, 0, $max_length unless $max_length <= 0; return $string; }