diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-05 02:13:09 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-03-05 02:13:09 +0000 |
commit | 55eda71149148d511e3e5da4f7c4e646dd445502 (patch) | |
tree | 5ac63e0b610b87bb3694e246aeccf3efd1f0489b /toke.c | |
parent | 6e2c8ce6fba866a92c47c38076567c2392d3f577 (diff) | |
download | perl-55eda71149148d511e3e5da4f7c4e646dd445502.tar.gz |
Retracting \N{U+HHHH}.
p4raw-id: //depot/perl@9025
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 29 |
1 files changed, 4 insertions, 25 deletions
@@ -1518,7 +1518,7 @@ S_scan_const(pTHX_ char *start) /* \N{latin small letter a} is a named character */ case 'N': - s++; + ++s; if (*s == '{') { char* e = strchr(s, '}'); SV *res; @@ -1530,30 +1530,9 @@ S_scan_const(pTHX_ char *start) e = s - 1; goto cont_scan; } - if (s[1] == 'U' && s[2] == '+') { /* \N{U+HHHH} */ - STRLEN alen = e - s - 3; - STRLEN blen; - UV uv = (UV)scan_hex(s + 3, alen, &blen); - - if (blen == alen) { - res = newSVpvn(s, (uv >> 8) + 1); /* filler */ - str = (char *)uv_to_utf8((U8*)SvPVX(res), uv); - SvCUR_set(res, str - SvPVX(res)); - *str = '\0'; - if (uv > 0x7f) - SvUTF8_on(res); - } - else { - yyerror("Illegal hexadecimal code on \\N{U+...}"); - e = s - 1; - goto cont_scan; - } - } - else { - res = newSVpvn(s + 1, e - s - 1); - res = new_constant( Nullch, 0, "charnames", - res, Nullsv, "\\N{...}" ); - } + res = newSVpvn(s + 1, e - s - 1); + res = new_constant( Nullch, 0, "charnames", + res, Nullsv, "\\N{...}" ); if (has_utf8) sv_utf8_upgrade(res); str = SvPV(res,len); |