From: Don Armstrong Date: Fri, 29 Dec 2017 22:41:13 +0000 (-0800) Subject: return octets if is_utf8 is on X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2c5d80ce71ef3f11f56acc57ad19ca5ad6daf2f4;p=infobot.git return octets if is_utf8 is on --- diff --git a/src/Factoids/DBCommon.pl b/src/Factoids/DBCommon.pl index 5321c25..9a22b9e 100644 --- a/src/Factoids/DBCommon.pl +++ b/src/Factoids/DBCommon.pl @@ -22,7 +22,9 @@ sub getFactInfo { ##### # Usage: &getFactoid($faqtoid); sub getFactoid { - return &getFactInfo( $_[0], 'factoid_value' ); + my $val = getFactInfo( $_[0], 'factoid_value' ); + return encode_utf8($val) if is_utf8($val); + return $val; } #####