| Store | Cart

[perl #128701] Unicode handling of warnings appears broken in 5.18.2 and 5.24.0

From: Father Chrysostomos via RT <perl...@perl.org>
Tue, 26 Jul 2016 00:04:19 -0700
On Fri Jul 22 10:36:25 2016, ajs wrote:
> $ perl -C x.pl> Can't find string terminator "Â" anywhere before EOF at x.pl line 4.> $ cat x.pl> use v5.18.0;> use utf8;> > say q« foo4 » ;> $perl -v> This is perl 5, version 18, subversion 2 (v5.18.2) built for> x86_64-linux-gnu-thread-multi> > Expected:> Can't find string terminator "«" anywhere before EOF at x.pl line 4.> > Or at least an error about the use of an invalid punctuation character as a> delimiter (perhaps "what do you think this is, Perl 6?!"). But definitely> not munged latin-1...> > Also tried this under 5.24.0 and got the same output.

The same bug occurs with the ‘(Might be a runaway multi-line...)’ hint that sometimes accompanies a syntax error.

In a utf-8 terminal, with 5.12.4:

$ perl -CS -e 'use utf8; q Ω' -e 'Ω >'
syntax error at -e line 2, at EOF
  (Might be a runaway multi-line ?????????????????????????? string starting on line 1)
Execution of -e aborted due to compilation errors.

And 5.25.3:

$ ./perl -Ilib -CS -e 'use utf8; q Ω' -e 'Ω >'
Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF at -e line 2.
Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF at -e line 2.
Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF at -e line 2.
Use of code point 0xFFFFFFFFFFFFFFCE is deprecated; the permissible max is 0x7FFFFFFFFFFFFFFF at -e line 2.
syntax error at -e line 2, at EOF
  (Might be a runaway multi-line ?????????????????????????? string starting on line 1)
Execution of -e aborted due to compilation errors.

Ow!

(Another thing I might note is that the runaway quote hint should include the operator if the delimiter is non-standard, because this is unhelpful:

$ perl -e 'q x' -e 'x >'
syntax error at -e line 2, at EOF
  (Might be a runaway multi-line xx string starting on line 1)
Execution of -e aborted due to compilation errors.
)
-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=128701

Recent Messages in this Thread
Aaron Sherman (via RT) Jul 22, 2016 05:36 pm
Father Chrysostomos via RT Jul 26, 2016 07:04 am
Father Chrysostomos via RT Jul 26, 2016 08:55 am
Father Chrysostomos via RT Jul 27, 2016 01:18 am
Messages in this thread