diff options
author | Larry Wall <larry@wall.org> | 1998-10-23 18:00:41 +0000 |
---|---|---|
committer | Larry Wall <larry@wall.org> | 1998-10-23 18:00:41 +0000 |
commit | 834a4ddd8309fbf6aabbbc51bb6fcbe056e7963f (patch) | |
tree | 10dce2532e7be7538af0c19f5a7d7f73c9220e55 /op.c | |
parent | 62b1ebc20082e645ed8e8a0cc6c1ebf91577cd34 (diff) | |
download | perl-834a4ddd8309fbf6aabbbc51bb6fcbe056e7963f.tar.gz |
Program with utf8 identifiers fails to compile
p4raw-id: //depot/perl@2038
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -120,7 +120,11 @@ pad_allocmy(char *name) PADOFFSET off; SV *sv; - if (!(isALPHA(name[1]) || name[1] == '_' && (int)strlen(name) > 2)) { + if (!( + isALPHA(name[1]) || + (PL_hints & HINT_UTF8 && (name[1] & 0xc0) == 0xc0) || + name[1] == '_' && (int)strlen(name) > 2)) + { if (!isPRINT(name[1])) { name[3] = '\0'; name[2] = toCTRL(name[1]); @@ -1687,7 +1691,7 @@ localize(OP *o, I32 lex) dTHR; if (ckWARN(WARN_PARENTHESIS) && PL_bufptr > PL_oldbufptr && PL_bufptr[-1] == ',') { char *s; - for (s = PL_bufptr; *s && (isALNUM(*s) || strchr("@$%, ",*s)); s++) ; + for (s = PL_bufptr; *s && (isALNUM(*s) || (*s & 0x80) || strchr("@$%, ",*s)); s++) ; if (*s == ';' || *s == '=') warner(WARN_PARENTHESIS, "Parens missing around \"%s\" list", lex ? "my" : "local"); |