Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ Wolfgang Laun <wolfgang.laun@alcatel.at> <wolfgang.laun@thalesgroup.com>
Wolfgang Laun <wolfgang.laun@alcatel.at> LAUN Wolfgang <wolfgang.laun@alcatel.at>
Wolfgang Laun <wolfgang.laun@alcatel.at> wolfgang.laun@chello.at <wolfgang.laun@chello.at>
YAMASHINA Hio <hio@ymir.co.jp> Hio <hio@hio.jp>
Yitzchak Scott-Thoennes <sthoenna@efn.org> Yitzchak Scott-Thoennes <sthoenna@gmail.com>
Yitzchak Scott-Thoennes <sthoenna@efn.org> Yitzchak Scott-Thoennes <ysth@raven.shiftboard.com>
Yuval Kogman <nothingmuch@woobling.org> nothingmuch@woobling.org <nothingmuch@woobling.org>
Yuval Kogman <nothingmuch@woobling.org> Yuval Kojman <unknown>
Expand Down
9 changes: 7 additions & 2 deletions lib/source/source_encoding.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (fresh_perl_like(<<~'EOT',
my $var = "¶";
EOT
qr/Use of non-ASCII character 0x[[:xdigit:]]{2} illegal/,
{ }, ">= 'use 5.39' implies use source::encoding 'ascii'")
{ }, ">= 'use 5.41' implies use source::encoding 'ascii'")
) {
fresh_perl_is(<<~'EOT',
use v5.41.0;
Expand All @@ -44,8 +44,13 @@ if (fresh_perl_like(<<~'EOT',
EOT
"",
{ }, "source encoding can be turned off");
fresh_perl_like(<<~'EOT',
use v5.41.0; my $var = "¶";
EOT
qr/Use of non-ASCII character 0x[[:xdigit:]]{2} illegal/,
{ }, ">= 'use statement affects rest of current line'");
}
else { # Above test depends on the previous one; if that failed, use this
else { # Above tests depend on the previous one; if that failed, use this
# alternate one
fresh_perl_is(<<~'EOT',
use source::encoding 'ascii';
Expand Down
1 change: 1 addition & 0 deletions op.c
Original file line number Diff line number Diff line change
Expand Up @@ -8477,6 +8477,7 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
else {
PL_hints &= ~HINT_ASCII_ENCODING;
}
notify_parser_that_encoding_changed();

PL_prevailing_version = shortver;
}
Expand Down
3 changes: 2 additions & 1 deletion pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ manager will later use a regex to expand these into links.

=item *

XXX
S<C<use 5.42>> now turns on S<C<use source::encoding "ascii">> for the
remainder of the line (besides subsequent lines). [GH #23881]

=back

Expand Down
Loading