读
man locale
我认为,该语言环境显示有关“当前语言环境”的信息或所有可用语言环境的列表。
另外,跑步
$ locale
给…
MongoDB:locale :: facet :: _ S_create_c_locale名称无效
std :: locale(const char *)冻结…有时。 Visual Studio的错误?
如何在Windows上为C ++程序设置适当的初始语言环境?
无Unicode库和Windows语言环境
LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL=
但是,这个人或者运行它都不能说明这些环境variables的作用。 我想特别问一下这些环境variables需要或用于什么? (比如说在运行这个环境variables的unix / linux操作系统上运行的软件)
问题:在这些语言环境下运行在OS上的软件是什么意思?
设置语言环境后,scanf-printf调用非ASCII字符
什么是en_US.UTF-8语言环境的Windows等价物?
格式化信息到另一种语言
升压语言环境的string转换:在Windows和Linux上的不同行为
Perl和Unix如何sorting,以相同的顺序排列Unicodestring?
哦,手册页( man 1 locale )呢:
LC_CTYPE Character classification and case conversion. LC_COLLATE Collation order. LC_TIME Date and time formats. LC_NUMERIC Non-monetary numeric formats. LC_MONETARY Monetary formats. LC_MESSAGES Formats of @R_104_4045@ive and diagnostic messages and interactive responses.
也许,你在错误的部分查找“locale”的手册页? 这些是标准的部分(见man man )
0 Header files (usually found in /usr/include) 1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conven- tions),eg man(7),groff(7) 8 System administration commands (usually only for root) 9 coreel routines [Non standard]
因此,对于locale二进制文件,您必须查看第1部分: man 1 locale 。 为了完全回答你的问题,我引用了locale的手册页的描述部分:
DESCRIPTION The locale utility shall write @R_104_4045@ion about the current locale environment,or all public locales,to the standard output. For the purposes of this section,a public locale is one provided by the imple- mentation that is accessible to the application. When locale is invoked without any arguments,it shall summarize the current locale environment for each locale category as determined by the settings of the environment variables defined in the Base Defini- tions volume of IEEE Std 1003.1-2001,Chapter 7,Locale. When invoked with operands,it shall write values that have been assigned to the keywords in the locale categories,as follows: * Specifying a keyword name shall select the named keyword and the category containing that keyword. * Specifying a category name shall select the named category and all keywords in that category.
样本( LC_TIME和LC_MESSAGES ):
$ export LC_TIME='fr_FR.UTF-8' #french time $ date mar. août 30 18:41:07 CEST 2011 $ export LC_TIME='de_DE.UTF-8' #german time $ date Di 30. Aug 18:41:12 CEST 2011 #english time $ export LC_TIME='en_US.UTF-8' $ date Tue Aug 30 18:41:17 CEST 2011 $ rm NON-EXIST rm: cannot remove `NON-EXIST': No such file or directory $ export LC_TIME='de_DE.UTF-8' #german time,but english MESSAGES $ rm NON-EXIST rm: cannot remove `NON-EXIST': No such file or directory $ export LC_MESSAGES='de_DE.UTF-8' #german messages $ rm NON-EXIST rm: cannot remove `NON-EXIST': file oder Verzeichnis nicht gefunden
LC_COLLATE用于根据语言对信息进行排序。 LC_MONETARY是货币格式(美国: $1.24 ,欧洲: 1.24 € )
语言环境管理很多东西,比如:
正在使用的编码(即, en_US.UTF-8或其他一些经典编码)
翻译文件用于标准库或其他应用程序。
国际化(数字格式,货币,日期)
C语言环境是“默认”语言环境。 通常建议更具体一些,并在Linux上启用UTF-8。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。