On Sun, Sep 03, 2023 at 12:57:10AM +0100, Gavin Smith wrote: > On Sat, Sep 02, 2023 at 09:03:12AM +0100, Gavin Smith wrote: > > On Sat, Sep 02, 2023 at 12:22:52AM +0100, Gavin Smith wrote: > > > Here's the change I'm looking at currently: > > > > The change with futher work is below. > > I committed something like this but left warnings alone.
Your change looks good to me. > > It may be difficult to get the encoding status of the text right: > > Indeed, it matters if the init file has "use utf8" or not and it is > impossible to be correct both ways. Agreed. > > As the existing comment already implies, it's not clear whether Perl warning > > messages come pre-encoded or not. I haven't been able to get Perl to output > > an inbuilt warning with a non-ASCII character yet; that would be one thing > > to check. > > I couldn't get Perl to translate its error messages, but you can put > non-ASCII in a line with a syntax error, which it doesn't cope with > well, giving multiple "Wide character in print" warnings: I do not think that it is a big deal. There are also many "Wide character in print" warnings when turning debug output on for the test suite when using only perl, and I think that the XS output is incorrect for accented characters (but I am not 100% sure). > $ cat syntax1.init > use utf8; > dope "syntaẍ error" > > $ perl -w syntax1.init > Unquoted string "dope" may clash with future reserved word at syntax1.init > line 2. > Wide character in print at syntax1.init line 2. > String found where operator expected at syntax1.init line 2, near "dope > "syntaẍ error"" > (Do you need to predeclare dope?) > Wide character in print at syntax1.init line 2. > syntax error at syntax1.init line 2, near "dope "syntaẍ error"" > Execution of syntax1.init aborted due to compilation errors. > > (this is perl 5.34.0.) > >