summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locale.c2
-rw-r--r--pod/perlrun.pod19
-rw-r--r--pod/perlunicode.pod14
-rw-r--r--pod/perluniintro.pod20
-rw-r--r--pod/perlvar.pod3
-rw-r--r--util.c2
6 files changed, 25 insertions, 35 deletions
diff --git a/locale.c b/locale.c
index b00828c2f9..9c41710b71 100644
--- a/locale.c
+++ b/locale.c
@@ -487,7 +487,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
it overrides LC_MESSAGES for GNU gettext, and it also
can have more than one locale, separated by spaces,
in case you need to know.)
- If PL_utf8locale and PL_unicode (set by -C or by $ENV{PERL_UNICODE)
+ If PL_utf8locale and PL_unicode (set by -C or by $ENV{PERL_UNICODE})
are true, perl.c:S_parse_body() will turn on the PerlIO :utf8 layer
on STDIN, STDOUT, STDERR, _and_ the default open discipline.
*/
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index e38ad3d152..a83acd6ea8 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -270,8 +270,8 @@ An alternate delimiter may be specified using B<-F>.
The C<-C> flag controls some Unicode of the Perl Unicode features.
As of 5.8.1, the C<-C> can be followed either by a number or a list
-of option letters. The letters and their numeric values are as follows;
-listing the letters is equal to summing the numbers.
+of option letters. The letters, their numeric values, and affects
+are as follows; listing the letters is equal to summing the numbers.
I 1 STDIN is assumed to be in UTF-8
O 2 STDOUT will be in UTF-8
@@ -291,20 +291,19 @@ For example, C<-COE> and C<-C6> will both turn on UTF-8-ness on both
STDOUT and STDERR. Repeating letters is just redundant, not cumulative
nor toggling.
-The C<-C> on its own (not followed by any number or option list),
-or an empty string as the C<$ENV{PERL_UNICODE}), has the same effect
+C<-C> on its own (not followed by any number or option list), or the
+empty string C<""> for the C<$ENV{PERL_UNICODE}, has the same effect
as <-CSDL>. In other words, the standard I/O handles and the default
C<open()> layer are UTF-8-fied B<but> only if the locale environment
-variables indicate a UTF-8 locale. This behavior follows the I<implicit>
-UTF-8 behaviour of Perl 5.8.0.
+variables indicate a UTF-8 locale. This behaviour follows the
+I<implicit> UTF-8 behaviour of Perl 5.8.0.
You can use C<-C0> to explicitly disable all the above Unicode features.
-See L<perluniintro>, L<perlfunc/open>, and L<open> for more information.
+See L<perlfunc/open>, and L<open> for more information.
-The read-only magic variable C<${^UNICODE}> reflects the state of this
-setting, see L<perlvar/"${^UNICODE}">. (Another way of setting this
-variable is to set the environment variable PERL_UNICODE.)
+The read-only magic variable C<${^UNICODE}> reflects the numeric value
+of this setting, see L<perlvar/"${^UNICODE}">.
(In Perls earlier than 5.8.1 the C<-C> switch was a Win32-only switch
that enabled the use of Unicode-aware "wide system call" Win32 APIs.
diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index 95d4857b7e..7df28e2cf3 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -1043,16 +1043,10 @@ there are a couple of exceptions:
=item *
-If your locale environment variables (LC_ALL, LC_CTYPE, LANG) contain
-the strings 'UTF-8' or 'UTF8' (matched case-insensitively) B<and> you
-enable using UTF-8 either by using the C<-C> command line switch or
-setting the PERL_UNICODE environment variable to be, C<"L">, an empty
-string, (see L<perlrun> and the documentation for the C<-C> switch for
-more information about the possible values), then the default
-encodings of your STDIN, STDOUT, and STDERR, and of B<any subsequent
-file open>, are considered to be UTF-8. See L<perluniintro>,
-L<perlfunc/open>, and L<open> for more information. The magic
-variable C<${^UNICODE}> will also be set.
+You can enable automatic UTF-8-ification of your standard file
+handles, default C<open()> layer, and C<@ARGV> by using either
+the C<-C> command line switch or the C<PERL_UNICODE> environment
+variable, see L<perlrun> for the documentation of the C<-C> switch.
=item *
diff --git a/pod/perluniintro.pod b/pod/perluniintro.pod
index 33400fc7b6..f18cdeeb80 100644
--- a/pod/perluniintro.pod
+++ b/pod/perluniintro.pod
@@ -172,17 +172,15 @@ To output UTF-8, use the C<:utf8> output layer. Prepending
to this sample program ensures that the output is completely UTF-8,
and removes the program's warning.
-If your locale environment variables (C<LC_ALL>, C<LC_CTYPE>, C<LANG>)
-contain the strings 'UTF-8' or 'UTF8' (matched case-insensitively)
-B<and> you enable using UTF-8 either by using the C<-C> command line
-switch or by setting the PERL_UNICODE environment variable to an empty
-string, C<"">, (see L<perlrun> and the documentation for the C<-C>
-switch for more information about the possible values), then the
-default encoding of your STDIN, STDOUT, and STDERR, and of B<any
-subsequent file open>, will be UTF-8. Note that this means that Perl
-expects other software to work, too: if Perl has been led to believe
-that STDIN should be UTF-8, but then STDIN coming in from another
-command is not UTF-8, Perl will complain about the malformed UTF-8.
+You can enable automatic UTF-8-ification of your standard file
+handles, default C<open()> layer, and C<@ARGV> by using either
+the C<-C> command line switch or the C<PERL_UNICODE> environment
+variable, see L<perlrun> for the documentation of the C<-C> switch.
+
+Note that this means that Perl expects other software to work, too:
+if Perl has been led to believe that STDIN should be UTF-8, but then
+STDIN coming in from another command is not UTF-8, Perl will complain
+about the malformed UTF-8.
All features that combine Unicode and I/O also require using the new
PerlIO feature. Almost all Perl 5.8 platforms do use PerlIO, though:
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 6790244d73..4d1a31b9f2 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -1119,8 +1119,7 @@ B<-t> or B<-TU>). This variable is read-only.
Reflects certain Unicode settings of Perl. See L<perlrun> for more
information about the possible values. This variable is set during
-Perl startup and thereafter read-only. See L<perluniintro>,
-L<perlfunc/open>, and L<open> for more information.
+Perl startup and thereafter read-only.
=item $PERL_VERSION
diff --git a/util.c b/util.c
index d5cc25690f..9720ce73ea 100644
--- a/util.c
+++ b/util.c
@@ -4357,7 +4357,7 @@ Perl_parse_unicode_opts(pTHX_ char **popt)
opt = PERL_UNICODE_DEFAULT_FLAGS;
if (opt & ~PERL_UNICODE_ALL_FLAGS)
- Perl_croak(aTHX_ "Unknown Unicode option value 0x%"UVXf,
+ Perl_croak(aTHX_ "Unknown Unicode option value 0x%"IVdf,
(UV) (opt & ~PERL_UNICODE_ALL_FLAGS));
*popt = p;