Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/utils/utils.sgml')
-rw-r--r--winsup/utils/utils.sgml142
1 files changed, 87 insertions, 55 deletions
diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml
index 79673c274..fcd259a6d 100644
--- a/winsup/utils/utils.sgml
+++ b/winsup/utils/utils.sgml
@@ -501,61 +501,6 @@ The format for ACL output is as follows:
</para>
</sect2>
-<sect2 id="getlocale"><title>getlocale</title>
-
-<screen>
-Usage: getlocale [-asuh]
-Print Windows locale(s)
-
-Options:
-
- -a, --all List all available locales
- -s, --system Print system default locale
- (default is current user default locale)
- -u, --utf Attach ".UTF-8" to the result
- -h, --help this text
-</screen>
-
-<para><command>getlocale</command> without parameters just prints the
-current user's Windows default locale to stdout. The <literal>-s</literal>
-option prints the systems default locale instead. With the
-<literal>-u</literal> option <command>getlocale</command> appends a ".UTF-8".
-This can be used in scripts to set the Cygwin locale to the Windows user
-or system default, for instance, for a US-based user:
-</para>
-
-<screen>
-bash$ export LANG=$(getlocale -u)
-bash$ echo $LANG
-en_US.UTF-8
-</screen>
-
-<para>The <literal>-a</literal> option is helpful to learn which locales
-are supported by your Windows machine. It prints all available locales,
-their meaning, and the allowed modifiers. Example:</para>
-
-<screen>
-bash$ getlocale -a
-ar_SA Arabic (Saudi Arabia)
-ar_IQ Arabic (Iraq)
-...
-zh_TW Chinese (Traditional) (Taiwan)
-zh_TW@cjknarrow Chinese (Traditional) (Taiwan)
-...
-de_AT German (Austria)
-de_AT@euro German (Austria)
-...
-en_US English (United States)
-en_GB English (United Kingdom)
-en_AU English (Australia)
-...
-sr_RS Serbian (Cyrillic) (Serbia)
-sr_RS@latin Serbian (Latin) (Serbia)
-...
-</screen>
-
-</sect2>
-
<sect2 id="kill"><title>kill</title>
<screen>
@@ -655,6 +600,93 @@ SIGUSR2 31 user defined signal 2
</sect2>
+<sect2 id="locale"><title>locale</title>
+
+<screen>
+Usage: locale [-amsuUvh]
+ or: locale [-ck] NAME
+Get locale-specific information.
+
+Options:
+
+ -a, --all-locales List all available supported locales
+ -c, --category-name List information about given category NAME
+ -k, --keyword-name Print information about given keyword NAME
+ -m, --charmaps List all available character maps
+ -s, --system Print system default locale
+ -u, --user Print user's default locale
+ -U, --utf Attach ".UTF-8" to the result
+ -v, --verbose More verbose output
+ -h, --help This text
+</screen>
+
+<para><command>locale</command> without parameters prints information about
+the current locale environment settings.</para>
+
+<para>The <literal>-u</literal> option prints the current user's Windows
+default locale to stdout. The <literal>-s</literal> option prints the
+systems default locale instead. With the <literal>-U</literal> option
+<command>locale</command> appends a ".UTF-8". This can be used in scripts
+to set the Cygwin locale to the Windows user or system default, for instance:
+</para>
+
+<screen>
+bash$ export LANG=$(locale -uU)
+bash$ echo $LANG
+en_US.UTF-8
+</screen>
+
+<para>The <literal>-a</literal> option is helpful to learn which locales
+are supported by your Windows machine. It prints all available locales
+and the allowed modifiers. The <literal>-v</literal> option prints
+additionally the English names of the language and territory connected
+to this locale. Example:</para>
+
+<screen>
+bash$ locale -av
+ar_SA Arabic (Saudi Arabia)
+ar_IQ Arabic (Iraq)
+...
+zh_TW Chinese (Traditional) (Taiwan)
+zh_TW@cjknarrow Chinese (Traditional) (Taiwan)
+...
+de_AT German (Austria)
+de_AT@euro German (Austria)
+...
+en_US English (United States)
+en_GB English (United Kingdom)
+en_AU English (Australia)
+...
+sr_RS Serbian (Cyrillic) (Serbia)
+sr_RS@latin Serbian (Latin) (Serbia)
+...
+</screen>
+
+<para>The <literal>-m</literal> option prints the names of the available
+charmaps supported by Cygwin to stdout.</para>
+
+<para>Otherwise, if arguments are given, <command>locale</command> prints
+the values assigned to these arguments. Arguments can be names of locale
+categories (for instance: LC_CTYPE, LC_MONETARY), or names of keywords
+supported in the locale categories (for instance: thousands_sep, charmap).
+The <literal>-c</literal> option prints additionally the name of the category.
+The <literal>-k</literal> option prints additionally the name of the keyword.
+Example:</para>
+
+<screen>
+bash$ locale -ck LC_MESSAGES
+LC_MESSAGES
+yesexpr="^[yY]"
+noexpr="^[nN]"
+yesstr="yes"
+nostr="no"
+messages-codeset="UTF-8"
+bash$ locale noexpr
+^[nN]
+</screen>
+
+</sect2>
+
<sect2 id="mkgroup"><title>mkgroup</title>
<screen>