summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorSimon Cozens <simon@netthink.co.uk>2000-12-08 13:33:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-08 15:57:11 +0000
commited646e6e695bd0d512934a33fa4b7fabef9ff020 (patch)
tree8ee2d1fe4f8e900d91d931d3a2b7579cdc70e744 /utf8.c
parentfac3506f11803acc27862962d9412fc8535bd7b6 (diff)
downloadperl-ed646e6e695bd0d512934a33fa4b7fabef9ff020.tar.gz
Re: ebcdic <-> ascii tables interjected in uv <-> utf8 considered harmful
Message-ID: <20001208133331.A11535@deep-dark-truthful-mirror.perlhacker.org> (The pp_hot part needed a rewrite.) p4raw-id: //depot/perl@8039
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/utf8.c b/utf8.c
index 7a652b43a4..e9c438600c 100644
--- a/utf8.c
+++ b/utf8.c
@@ -506,14 +506,9 @@ Perl_utf8_to_bytes(pTHX_ U8* s, STRLEN *len)
d = s = save;
while (s < send) {
- if (*s < 0x80) {
- *d++ = *s++;
- }
- else {
- STRLEN ulen;
- *d++ = (U8)utf8_to_uv_simple(s, &ulen);
- s += ulen;
- }
+ STRLEN ulen;
+ *d++ = (U8)utf8_to_uv_simple(s, &ulen);
+ s += ulen;
}
*d = '\0';
*len = d - save;