This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: ebcdic <-> ascii tables interjected in uv <-> utf8 considered harmful
authorSimon Cozens <simon@netthink.co.uk>
Fri, 8 Dec 2000 13:33:31 +0000 (13:33 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 5 Jan 2001 15:57:37 +0000 (15:57 +0000)
Message-ID: <20001208133331.A11535@deep-dark-truthful-mirror.perlhacker.org>

A lost patch fragment.

p4raw-id: //depot/perl@8333

doop.c

diff --git a/doop.c b/doop.c
index 212d496..3b0ddc1 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -66,10 +66,7 @@ S_do_trans_simple(pTHX_ SV *sv)
        c = utf8_to_uv(s, send - s, &ulen, 0);
         if (c < 0x100 && (ch = tbl[(short)c]) >= 0) {
             matches++;
-            if (UTF8_IS_ASCII(ch))
-                *d++ = ch;
-            else
-                d = uv_to_utf8(d,ch);
+           d = uv_to_utf8(d, ch);
             s += ulen;
         }
        else { /* No match -> copy */