summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Encode/Encode.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs
index c231bbab6b..9dea8d0bf5 100644
--- a/ext/Encode/Encode.xs
+++ b/ext/Encode/Encode.xs
@@ -182,7 +182,7 @@ _is_utf8(sv, ...)
{
SV * check = items == 2 ? ST(1) : Nullsv;
if (SvPOK(sv)) {
- RETVAL = SvUTF8(sv);
+ RETVAL = SvUTF8(sv) ? 1 : 0;
if (RETVAL &&
SvTRUE(check) &&
!is_utf8_string((U8*)SvPVX(sv), SvCUR(sv)))