From owner-svn-src-head@freebsd.org Sat Jun 27 20:55:48 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5966035C0CB; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vQyD1XPQz4RPp; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F9EEB52F; Sat, 27 Jun 2020 20:55:48 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RKtm13016475; Sat, 27 Jun 2020 20:55:48 GMT (envelope-from joerg@FreeBSD.org) Received: (from joerg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RKtmAP016474; Sat, 27 Jun 2020 20:55:48 GMT (envelope-from joerg@FreeBSD.org) Message-Id: <202006272055.05RKtmAP016474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: joerg set sender to joerg@FreeBSD.org using -f From: Joerg Wunsch Date: Sat, 27 Jun 2020 20:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362708 - head/lib/libc/locale X-SVN-Group: head X-SVN-Commit-Author: joerg X-SVN-Commit-Paths: head/lib/libc/locale X-SVN-Commit-Revision: 362708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 20:55:48 -0000 Author: joerg Date: Sat Jun 27 20:55:47 2020 New Revision: 362708 URL: https://svnweb.freebsd.org/changeset/base/362708 Log: 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 Modified: head/lib/libc/locale/setlocale.3 Modified: head/lib/libc/locale/setlocale.3 ============================================================================== --- head/lib/libc/locale/setlocale.3 Sat Jun 27 20:01:56 2020 (r362707) +++ head/lib/libc/locale/setlocale.3 Sat Jun 27 20:55:47 2020 (r362708) @@ -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 ,