summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-18 16:34:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-18 16:34:29 +0000
commitc88828dcbffbb4012ad6dc9e62721d09fc8ce3ed (patch)
tree12147f739f6ebc30285f132f692554913603d373 /pp_sys.c
parent003a51c12003a23e8a5f07e66eb9bceafa71af29 (diff)
downloadperl-c88828dcbffbb4012ad6dc9e62721d09fc8ce3ed.tar.gz
syswrite() was still returning byte counts, not character counts.
p4raw-id: //depot/perl@13074
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index e7a9de1880..a333b1053a 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1842,6 +1842,9 @@ PP(pp_send)
/* See the note at doio.c:do_print about filesize limits. --jhi */
retval = PerlLIO_write(PerlIO_fileno(IoIFP(io)),
buffer, length);
+ if (DO_UTF8(bufsv))
+ retval = utf8_length((U8*)SvPVX(bufsv),
+ (U8*)SvPVX(bufsv) + retval);
}
}
#ifdef HAS_SOCKET