summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-16 04:24:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-16 04:24:45 +0000
commit491f958c9b9ea636ca814e3c48177e833a01e72f (patch)
treefb9d2ac38eedb85caaca6d80235c8bb9c2aebe90 /utf8.c
parent50746cefef18acfccdd4f81e6e16d9a7592e94ad (diff)
downloadperl-491f958c9b9ea636ca814e3c48177e833a01e72f.tar.gz
Tiny tweak.
p4raw-id: //depot/perl@14716
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/utf8.c b/utf8.c
index 41132a652d..52768adef7 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1299,11 +1299,12 @@ Perl_to_utf8_case(pTHX_ U8 *p, U8* ustrp, STRLEN *lenp, SV **swashp, char *norma
uv2 = swash_fetch(*swashp, tmpbuf, TRUE);
if (uv2) {
/* It was "normal" (single character mapping). */
- if (lenp)
- *lenp = UNISKIP(uv2);
- uvuni_to_utf8(ustrp, uv2);
+ uv2 = UNI_TO_NATIVE(uv2);
+ len = uvchr_to_utf8(ustrp, uv2) - ustrp;
+ if (lenp)
+ *lenp = len;
- return uv2;
+ return uv2;
}
else {
HV *hv;