aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libc/locale/setlocale.3
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2020-06-27 20:55:47 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2020-06-27 20:55:47 +0000
commit72adb2c07fd2cfc1d9f8bec1db144b31e835b583 (patch)
tree685587578ec54f44dc29ad86945a1beaaefff54f /lib/libc/locale/setlocale.3
parentac4b8a1ce45ae5f1da70132d697908afff2a581c (diff)
downloadsrc-72adb2c07fd2cfc1d9f8bec1db144b31e835b583.tar.gz
src-72adb2c07fd2cfc1d9f8bec1db144b31e835b583.zip
Explain how to learn about possible recognized locale names
Posix says that the interpretation of the locale string is "implementation-defined", so we ought to document what is actually recognized. Also add a cross reference to locale(1). PR: 247553 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=362708
Diffstat (limited to 'lib/libc/locale/setlocale.3')
-rw-r--r--lib/libc/locale/setlocale.316
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3
index 64597333ad85..586d82dd3dc2 100644
--- a/lib/libc/locale/setlocale.3
+++ b/lib/libc/locale/setlocale.3
@@ -115,9 +115,24 @@ argument of
causes
.Fn setlocale
to return the current locale.
+.Pp
+The option
+.Fl a
+to the
+.Xr locale 1
+command can be used to display all further possible names for the
+.Fa locale
+argument that are recognized.
+Specifying any unrecognized value for
+.Fa locale
+makes
+.Fn setlocale
+fail.
+.Pp
By default, C programs start in the
.Li \&"C"
locale.
+.Pp
The only function in the library that sets the locale is
.Fn setlocale ;
the locale is never changed as a side effect of some other routine.
@@ -150,6 +165,7 @@ and the category
.Sh ERRORS
No errors are defined.
.Sh SEE ALSO
+.Xr locale 1 ,
.Xr localedef 1 ,
.Xr catopen 3 ,
.Xr ctype 3 ,