diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-04-24 17:39:00 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-04-24 17:39:00 +0000 |
commit | 92d29cee5ff815b05b81b877528e4c77e73881c9 (patch) | |
tree | 1887469b52eec03299be2ab643c8a5310d73622e /sv.c | |
parent | 85e0ebd8793b17cfbac766abc03b5fff57b2b2cd (diff) | |
download | perl-92d29cee5ff815b05b81b877528e4c77e73881c9.tar.gz |
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@5937
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -3920,10 +3920,19 @@ Perl_sv_eq(pTHX_ register SV *str1, register SV *str2) else pv1 = SvPV(str1, cur1); - if (!str2) - return !cur1; - else - pv2 = SvPV(str2, cur2); + if (cur1) { + if (!str2) + return 0; + if (SvUTF8(str1) != SvUTF8(str2)) { + if (SvUTF8(str1)) { + sv_utf8_upgrade(str2); + } + else { + sv_utf8_upgrade(str1); + } + } + } + pv2 = SvPV(str2, cur2); if (cur1 != cur2) return 0; |