Integrate mainline
[p5sagit/p5-mst-13.2.git] / pod / perllocale.pod
index 5232eba..bc7eecb 100644 (file)
@@ -310,6 +310,10 @@ locale "En_US"--and in Cshish shells (B<csh>, B<tcsh>)
 
        setenv LC_ALL en_US.ISO8859-1
 
+or if you have the "env" application you can do in any shell
+
+       env LC_ALL=en_US.ISO8859-1 perl ...
+
 If you do not know what shell you have, consult your local
 helpdesk or the equivalent.
 
@@ -427,25 +431,28 @@ parameters as integers correctly formatted in the current locale:
         }
         print "\n";
 
-=head2 I18::Langinfo
+=head2 I18N::Langinfo
 
 Another interface for querying locale-dependent information is the
 I18N::Langinfo::langinfo() function, available at least in UNIX-like
 systems and VMS.
 
-The following example will import the langinfo() function itself
-(implicitly) and (explicitly) three string constants: a string for the
-abbreviated first day of the week (the numbering starts from Sunday =
-1) and two strings for the affirmative and negative answers for a
-yes/no question in the current locale.
+The following example will import the langinfo() function itself and
+three constants to be used as arguments to langinfo(): a constant for
+the abbreviated first day of the week (the numbering starts from
+Sunday = 1) and two more constants for the affirmative and negative
+answers for a yes/no question in the current locale.
+
+    use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR);
 
-    use I18N::Langinfo qw(ABDAY_1 YESSTR NOSTR);
+    my ($abday_1, $yesstr, $nostr) = map { langinfo } qw(ABDAY_1 YESSTR NOSTR);
 
-    print ABDAY_1, "? [", YESSTR, "/", NOSTR, "] ";
+    print "$abday_1? [$yesstr/$nostr] ";
 
-In other words, in the "C" (or English) locale the above will print:
+In other words, in the "C" (or English) locale the above will probably
+print something like:
 
-    Sun? [y/n] 
+    Sun? [yes/no] 
 
 See L<I18N::Langinfo> for more information.
 
@@ -633,7 +640,7 @@ exists only to generate locale-dependent results, strftime() always
 obeys the current C<LC_TIME> locale.
 
 See also L<I18N::Langinfo> and C<ABDAY_1>..C<ABDAY_7>, C<DAY_1>..C<DAY_7>,
-C<ABMON_1>..C<ABMON_12>, and C<ABMON_1>..C<ABMON_12>; and L<Time::Piece>.
+C<ABMON_1>..C<ABMON_12>, and C<ABMON_1>..C<ABMON_12>.
 
 =head2 Other categories
 
@@ -954,7 +961,7 @@ structure.
 =head2 Freely available locale definitions
 
 There is a large collection of locale definitions at
-C<ftp://dkuug.dk/i18n/WG15-collection>.  You should be aware that it is
+ftp://dkuug.dk/i18n/WG15-collection .  You should be aware that it is
 unsupported, and is not claimed to be fit for any purpose.  If your
 system allows installation of arbitrary locales, you may find the
 definitions useful as they are, or as a basis for the development of
@@ -978,6 +985,15 @@ nations, when we all know that the world can equally well be divided
 into bankers, bikers, gamers, and so on.  But, for now, it's the only
 standard we've got.  This may be construed as a bug.
 
+=head1 Unicode and UTF-8
+
+The support of Unicode is new starting from Perl version 5.6, and
+more fully implemented in the version 5.8.  See L<perluniintro> and
+L<perlunicode> for more details.
+
+Usually locale settings and Unicode do not affect each other, but
+there are exceptions, see L<perlunicode/Locales> for examples.
+
 =head1 BUGS
 
 =head2 Broken systems
@@ -993,7 +1009,8 @@ operating system upgrade.
 
 =head1 SEE ALSO
 
-L<I18N::Langinfo>, L<POSIX/isalnum>, L<POSIX/isalpha>,
+L<I18N::Langinfo>, L<perluniintro>, L<perlunicode>, L<open>,
+L<POSIX/isalnum>, L<POSIX/isalpha>,
 L<POSIX/isdigit>, L<POSIX/isgraph>, L<POSIX/islower>,
 L<POSIX/isprint>, L<POSIX/ispunct>, L<POSIX/isspace>,
 L<POSIX/isupper>, L<POSIX/isxdigit>, L<POSIX/localeconv>,