Linux file encoding

Source: Internet
Author: User

Create a new file under Linux, or use fopen new, what is the encoding of the file?

Linux system default language code is as follows

# cat/etc/sysconfig/i18n


Lang= "en_US. UTF-8 "
Sysfont= "Latarcyrheb-sun16"

run the locale command to get the details of the current system encoding settings.

First, the organs of the locale

1. Language symbols and their classification (LC_CTYPE)
2, Digital (lc_numeric)
3. Comparison and sequencing habits (lc_collate)
4. Time display format (lc_time)
5. Monetary unit (lc_monetary)
6, information is mainly information, error information, status information, title, tags, buttons and menus, etc. (lc_messages)
7. Name writing method (Lc_name)
8. Address writing method (lc_address)
9, telephone number writing method (Lc_telephone)
10. Expression of weights and measures (lc_measurement)
11. Default paper Size (lc_paper)
12. An overview of the locale itself containing information (lc_identification).

"[Email protected]]$ locale
Lang=en_us. UTF-8
Lc_ctype= "en_US. UTF-8 "
Lc_numeric= "en_US. UTF-8 "
Lc_time= "en_US. UTF-8 "
Lc_collate= "en_US. UTF-8 "
Lc_monetary= "en_US. UTF-8 "
Lc_messages= "en_US. UTF-8 "
Lc_paper= "en_US. UTF-8 "
Lc_name= "en_US. UTF-8 "
Lc_address= "en_US. UTF-8 "
Lc_telephone= "en_US. UTF-8 "
Lc_measurement= "en_US. UTF-8 "
Lc_identification= "en_US. UTF-8 "
Lc_all=

Second, understand the setting of locale

Setting locale is the setting of 12 categories of locale classification attributes, that is, 12 lc_*. In addition to these 12 variables can be set, for the sake of simplicity, there are two variables: lc_all and lang.

There is a priority relationship between them: Lc_all > Lc_* > LANG

As you can say, Lc_all is the most advanced setting or mandatory setting, and Lang is the default setting value.

Linux file encoding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.