summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-07-08 01:43:24 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-07-08 01:43:24 +0000
commit809e8e66a971d59a948ca995e08b228927d82c66 (patch)
tree33609227a5c39d8275b46495de836f85a5eaa912 /utf8.c
parent27cc343c4fb8030e5afb7c3824647d9e5e1d08d6 (diff)
downloadperl-809e8e66a971d59a948ca995e08b228927d82c66.tar.gz
[perl #36207] UTF8/Latin 1/i regexp "Malformed character" warning
$utf8 =~ /latin/i didn't match. Also added TODO for $latin =~ /utf8/i which also fails p4raw-id: //depot/perl@25095
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index b26d5a63f2..cdf24ce794 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2037,7 +2037,7 @@ Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const
if (u1)
to_utf8_fold(p1, foldbuf1, &foldlen1);
else {
- natbuf[0] = *p1;
+ uvuni_to_utf8(natbuf, (UV) NATIVE_TO_UNI(((UV)*p1)));
to_utf8_fold(natbuf, foldbuf1, &foldlen1);
}
q1 = foldbuf1;
@@ -2047,7 +2047,7 @@ Perl_ibcmp_utf8(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const
if (u2)
to_utf8_fold(p2, foldbuf2, &foldlen2);
else {
- natbuf[0] = *p2;
+ uvuni_to_utf8(natbuf, (UV) NATIVE_TO_UNI(((UV)*p2)));
to_utf8_fold(natbuf, foldbuf2, &foldlen2);
}
q2 = foldbuf2;