Larry's fix for buggy propagation of utf8-ness in join(); add test
[p5sagit/p5-mst-13.2.git] / pod / perllocale.pod
index 95aa6af..be37385 100644 (file)
@@ -215,6 +215,8 @@ I<SEE ALSO> section).  If that fails, try the following command lines:
 
         ls /usr/lib/nls
 
+       ls /usr/share/locale
+
 and see whether they list something resembling these
 
         en_US.ISO8859-1     de_DE.ISO8859-1     ru_RU.ISO8859-5
@@ -307,7 +309,7 @@ discussed above.  We decided to try that instead of the above faulty
 locale "En_US"--and in Cshish shells (B<csh>, B<tcsh>)
 
        setenv LC_ALL en_US.ISO8859-1
-       
+
 If you do not know what shell you have, consult your local
 helpdesk or the equivalent.
 
@@ -330,9 +332,9 @@ Second, if using the listed commands you see something B<exactly>
 (prefix matches do not count and case usually counts) like "En_US"
 without the quotes, then you should be okay because you are using a
 locale name that should be installed and available in your system.
-In this case, see L<Permanently fixing system locale configuration>.
+In this case, see L<Permanently fixing your system's locale configuration>.
 
-=head2 Permanently fixing your locale configuration
+=head2 Permanently fixing your system's locale configuration
 
 This is when you see something like:
 
@@ -606,8 +608,12 @@ obeys the current C<LC_TIME> locale.
 
 The remaining locale category, C<LC_MESSAGES> (possibly supplemented
 by others in particular implementations) is not currently used by
-Perl--except possibly to affect the behavior of library functions called
-by extensions outside the standard Perl distribution.
+Perl--except possibly to affect the behavior of library functions
+called by extensions outside the standard Perl distribution and by the
+operating system and its utilities.  Note especially that the string
+value of C<$!> and the error messages given by external utilities may
+be changed by C<LC_MESSAGES>.  If you want to have portable error
+codes, use C<%!>.  See L<Errno>.
 
 =head1 SECURITY
 
@@ -635,11 +641,12 @@ case-mapping table is in effect.
 
 =item *
 
-If the decimal point character in the C<LC_NUMERIC> locale is
-surreptitiously changed from a dot to a comma, C<sprintf("%g",
-0.123456e3)> produces a string result of "123,456". Many people would
-interpret this as one hundred and twenty-three thousand, four hundred
-and fifty-six.
+Some systems are broken in that they allow the "C" locale to be
+overridden by users.  If the decimal point character in the
+C<LC_NUMERIC> category of the "C" locale is surreptitiously changed
+from a dot to a comma, C<sprintf("%g", 0.123456e3)> produces a
+string result of "123,456".  Many people would interpret this as
+one hundred and twenty-three thousand, four hundred and fifty-six.
 
 =item *
 
@@ -708,10 +715,6 @@ if modified as a result of a substitution based on a regular
 expression match involving C<\w>, C<\W>, C<\s>, or C<\S>; or of
 case-mapping with C<\l>, C<\L>,C<\u> or C<\U>.
 
-=item B<In-memory formatting function> (sprintf()):
-
-Result is tainted if C<use locale> is in effect.
-
 =item B<Output formatting functions> (printf() and write()):
 
 Success/failure result is never tainted.
@@ -812,9 +815,14 @@ set, it overrides all the rest of the locale environment variables.
 B<NOTE>: C<LANGUAGE> is a GNU extension, it affects you only if you
 are using the GNU libc.  This is the case if you are using e.g. Linux.
 If you are using "commercial" UNIXes you are most probably I<not>
-using libc and you can ignore C<LANGUAGE>.  But in the case you are
-using it: it is an even more powerful "override-all" than C<LC_ALL>
-and moreover, it's a "path" (":"-separated list) of locales.
+using GNU libc and you can ignore C<LANGUAGE>.
+
+However, in the case you are using C<LANGUAGE>: it affects the
+language of informational, warning, and error messages output by
+commands (in other words, it's like C<LC_MESSAGES>) but it has higher
+priority than L<LC_ALL>.  Moreover, it's not a single value but
+instead a "path" (":"-separated list) of I<languages> (not locales).
+See the GNU C<gettext> library documentation for more information.
 
 =item LC_CTYPE