summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAndreas König <a.koenig@mind.de>2000-10-24 16:01:26 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-24 17:55:17 +0000
commit067a85ef854d787b90f02ceec6c3398c3103295b (patch)
treeaef8b158234263f6ad54afd6c597bf4ee6243cc2 /ext
parente2c57c3ea2e1fe3adabb752ab93e7f4b7746a103 (diff)
downloadperl-067a85ef854d787b90f02ceec6c3398c3103295b.tar.gz
Fix the bug reported in
Subject: Encode bug? Message-ID: <m3lmveqwh5.fsf@ak-71.mind.de> Also make is_utf8_char() stricter. p4raw-id: //depot/perl@7425
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)))