summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-20 20:04:39 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-20 20:04:39 +0000
commit2b9d42f0ba1bb562fe21327dc7948ab1a5397a19 (patch)
treeaee45626e3738deabafbe610cedef159d4c82d3b /sv.c
parentf2f6ab5ed2d2f824b4f6c3085a4a2275c2f8500a (diff)
downloadperl-2b9d42f0ba1bb562fe21327dc7948ab1a5397a19.tar.gz
More EBCDIC stuff:
- Loose the extra level of function on ASCII. - spotted a chr(0) issue in sv.c - re-work of UTF-X tr/// ranges to work in Unicode space. Still issues with the "0xff is illegal UTF-8" hack. - Yet another ad. hoc. utf8 'upgrade' in op.c recoded (why do it once when you can do it all over the place :-( - Enable HINTS_UTF8 on EBCDIC - then ignore it in toke.c, need utf8.pm for swashes. - Simplified and commented scan_const() in toke.c Still something wrong regexp and tr (swashes?). p4raw-id: //depot/perlio@9267
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 6d6d39e9f5..315c85b1a0 100644
--- a/sv.c
+++ b/sv.c
@@ -4733,8 +4733,9 @@ Perl_sv_pos_b2u(pTHX_ register SV *sv, I32* offsetp)
len = 0;
while (s < send) {
STRLEN n;
- /* We can use low level directly here as we are not looking at the values */
- if (utf8n_to_uvuni(s, UTF8SKIP(s), &n, 0)) {
+ /* Call utf8n_to_uvchr() to validate the sequence */
+ utf8n_to_uvchr(s, UTF8SKIP(s), &n, 0);
+ if (n > 0) {
s += n;
len++;
}