summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-25 18:52:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-25 18:52:30 +0000
commitfcc8fcf67e5ea5f08178c9ac86509bc972ef38ff (patch)
treec1e1979344ade58a2413d5700ea4ecba54b6afbe /toke.c
parent5bbb0b5ac8fdf0a5cc17b4f7b9199f9e3d7db4b6 (diff)
downloadperl-fcc8fcf67e5ea5f08178c9ac86509bc972ef38ff.tar.gz
Allow poking holes at the UTF-8 decoding strictness.
p4raw-id: //depot/perl@7438
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 32073a5842..78ed359890 100644
--- a/toke.c
+++ b/toke.c
@@ -1331,9 +1331,9 @@ S_scan_const(pTHX_ char *start)
STRLEN len;
UV uv;
- uv = utf8_to_uv_chk((U8*)s, send - s, &len, 1);
+ uv = utf8_to_uv_chk((U8*)s, send - s, &len, UTF8_CHECK_ONLY);
if (len == 1) {
- /* illegal UTF8, make it valid */
+ /* Illegal UTF8 (a high-bit byte), make it valid. */
char *old_pvx = SvPVX(sv);
/* need space for one extra char (NOTE: SvCUR() not set here) */
d = SvGROW(sv, SvLEN(sv) + 1) + (d - old_pvx);