From 2c5d80ce71ef3f11f56acc57ad19ca5ad6daf2f4 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 29 Dec 2017 14:41:13 -0800 Subject: [PATCH] return octets if is_utf8 is on --- src/Factoids/DBCommon.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } ##### -- 2.39.2