summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorPeter Prymmer <PPrymmer@factset.com>2001-03-08 08:23:25 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-09 01:01:27 +0000
commit3bd709b1a63d554f3d98d5394be78ed628eb46da (patch)
treeb8add48b769c1a6db079b5276eb469d4c75a1ef4 /utf8.c
parent538c41fbfff9c31ee1c8c40096f132b1ea496531 (diff)
downloadperl-3bd709b1a63d554f3d98d5394be78ed628eb46da.tar.gz
Re: Unicode/EBCDIC
Message-ID: <Pine.OSF.4.10.10103081617390.377472-100000@aspara.forte.com> p4raw-id: //depot/perl@9082
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index f00659a986..55a8c7cba5 100644
--- a/utf8.c
+++ b/utf8.c
@@ -46,6 +46,8 @@ is the recommended Unicode-aware way of saying
U8 *
Perl_uv_to_utf8(pTHX_ U8 *d, UV uv)
{
+ if (uv < 0x100)
+ uv = NATIVE_TO_ASCII(uv);
if (uv < 0x80) {
*d++ = uv;
return d;
@@ -254,7 +256,7 @@ Perl_utf8_to_uv(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, U32 flags)
if (UTF8_IS_ASCII(uv)) {
if (retlen)
*retlen = 1;
- return *s;
+ return ASCII_TO_NATIVE(*s);
}
if (UTF8_IS_CONTINUATION(uv) &&