summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-18 04:22:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-18 04:22:43 +0000
commit05d340b81db0665672bf1917f71d6cb9459a3b2b (patch)
tree59b1656dc9aaed95bc0d7013cb8512ec19aa5602 /doop.c
parent62fe13c2faf7fffe785bfea95f8e9e927ace891e (diff)
downloadperl-05d340b81db0665672bf1917f71d6cb9459a3b2b.tar.gz
tr/// UTF-8 patches from Inaba Hiroto.
p4raw-id: //depot/perl@9192
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/doop.c b/doop.c
index a6391b4588..bd66b42739 100644
--- a/doop.c
+++ b/doop.c
@@ -213,7 +213,8 @@ S_do_trans_complex(pTHX_ SV *sv)/* SPC - NOT OK */
else {
matches++;
if (!del) {
- ch = (comp - 0x100 < rlen) ?
+ ch = (rlen == 0) ? comp :
+ (comp - 0x100 < rlen) ?
tbl[comp+1] : tbl[0x100+rlen];
if (ch != pch) {
d = uvchr_to_utf8(d, ch);
@@ -601,6 +602,7 @@ Perl_do_trans(pTHX_ SV *sv)
return do_trans_simple(sv);
case OPpTRANS_IDENTICAL:
+ case OPpTRANS_IDENTICAL|OPpTRANS_COMPLEMENT:
if (hasutf)
return do_trans_count_utf8(sv);
else