From: Jarkko Hietaniemi Date: Fri, 1 Dec 2000 03:20:39 +0000 (+0000) Subject: \x{} doesn't any more require 'use utf8' outside regexen so why X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de5f0749ee4fa4a85092e853d4c2971a66843dc4;p=p5sagit%2Fp5-mst-13.2.git \x{} doesn't any more require 'use utf8' outside regexen so why should it be required inside regexen? p4raw-id: //depot/perl@7938 --- diff --git a/regcomp.c b/regcomp.c index f09e49d..784e83e 100644 --- a/regcomp.c +++ b/regcomp.c @@ -2912,7 +2912,7 @@ tryagain: RExC_parse = p + 1; vFAIL("Missing right brace on \\x{}"); } - else if (UTF) { + else { numlen = 1; /* allow underscores */ ender = (UV)scan_hex(p + 1, e - p - 1, &numlen); /* numlen is generous */ @@ -2922,12 +2922,6 @@ tryagain: } p = e + 1; } - else - { - RExC_parse = e + 1; - vFAIL("Can't use \\x{} without 'use utf8' declaration"); - } - } else { numlen = 0; /* disallow underscores */ diff --git a/t/op/regmesg.t b/t/op/regmesg.t index 6b7f52b..50a020b 100644 --- a/t/op/regmesg.t +++ b/t/op/regmesg.t @@ -71,8 +71,6 @@ my @death = 'use utf8; /[\x{X]/' => 'Missing right brace on \x{} before {#} mark in regex m/[\x{{#}X]/', - '/\x{x}/' => 'Can\'t use \x{} without \'use utf8\' declaration before {#} mark in regex m/\x{x}{#}/', - '/[[:barf:]]/' => 'POSIX class [:barf:] unknown before {#} mark in regex m/[[:barf:]{#}]/', '/[[=barf=]]/' => 'POSIX syntax [= =] is reserved for future extensions before {#} mark in regex m/[[=barf=]{#}]/',