summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-04-24 17:39:00 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-04-24 17:39:00 +0000
commit92d29cee5ff815b05b81b877528e4c77e73881c9 (patch)
tree1887469b52eec03299be2ab643c8a5310d73622e /sv.c
parent85e0ebd8793b17cfbac766abc03b5fff57b2b2cd (diff)
downloadperl-92d29cee5ff815b05b81b877528e4c77e73881c9.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@5937
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 8f7e1f2aab..a9964711a9 100644
--- a/sv.c
+++ b/sv.c
@@ -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;