From 87a16f665d01ed72959b9a366e8ab74a97f9cb4b Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Sat, 11 Oct 2025 23:46:41 +0200 Subject: [PATCH] perldelta for the -CA -s interaction fix --- pod/perldelta.pod | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 147ab795c6..78c0da7e57 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -366,6 +366,25 @@ manager will later use a regex to expand these into links. =item * +The C<-CA> flag (or equivalently, the C environment setting) +tells perl to treat command-line arguments as UTF-8 strings. (See L +for details.) However, this did not extend to the global variables implicitly +created by the C<-s> option: + + $ perl -CA -s -e 'printf "%vx\n", $_ for $foo, $ARGV[0]' -- -foo=é é + c3.a9 + e9 + +Here C<$foo> would end up containing the two-byte UTF-8 representation of +"LATIN SMALL LETTER E WITH ACUTE", but C<$ARGV[0]> would contain a single +codepoint corresponding to U+00E9. + +This has been fixed: If C<-CA> is in effect, options parsed by C<-s> are +treated as UTF-8, too. In the example above, C<$foo> and C<$ARGV[0]> now both +contain C. [GH #23377] + +=item * + We have long claimed to support identifiers up to about 255 characters long. However this was actually true only for identifiers that consisted of only ASCII characters. The real upper limit was as few as