From: Jarkko Hietaniemi Date: Sat, 11 May 2002 22:24:31 +0000 (+0000) Subject: EBCDIC: the toke.c wariness about UTF-8 (really, UTF-EBCDIC) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=746b446a82799460054f7c1acb01d263532ccf04;p=p5sagit%2Fp5-mst-13.2.git EBCDIC: the toke.c wariness about UTF-8 (really, UTF-EBCDIC) scripts does not apply any more. (The utf8.t needed a little bit of relaxing to work in EBCDIC, since *both* the bytes in subtest #30 are illegal UTF-EBCDIC, and the error message matched is slightly different.) The utf8.t now passes. p4raw-id: //depot/perl@16550 --- diff --git a/lib/utf8.t b/lib/utf8.t index acd64bf..e11d856 100644 --- a/lib/utf8.t +++ b/lib/utf8.t @@ -166,7 +166,7 @@ plan tests => 94; use utf8; %a = ("\xE1\xA0"=>"sterling"); print 'start'; printf '%x,', ord \$_ foreach keys %a; print "end\n"; BANG - qr/^Malformed UTF-8 character \(2 bytes, need 3.+\).*start\d+,end$/s + qr/^Malformed UTF-8 character \(\d bytes?, need \d, .+\).*start\d+,end$/sm ], ); foreach (@tests) { diff --git a/toke.c b/toke.c index 5635e2c..7265fb0 100644 --- a/toke.c +++ b/toke.c @@ -41,11 +41,7 @@ static I32 utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen); #ifdef USE_UTF8_SCRIPTS # define UTF (!IN_BYTES) #else -# ifdef EBCDIC /* For now 'use utf8' does not affect tokenizer on EBCDIC */ -# define UTF (PL_linestr && DO_UTF8(PL_linestr)) -# else -# define UTF ((PL_linestr && DO_UTF8(PL_linestr)) || (PL_hints & HINT_UTF8)) -# endif +# define UTF ((PL_linestr && DO_UTF8(PL_linestr)) || (PL_hints & HINT_UTF8)) #endif /* In variables named $^X, these are the legal values for X.