Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3259  / 1 Year ago, sat, november 26, 2022, 10:26:26

There are some questions about Linux locale confused me much.



What is the difference between zh_CN.utf8 and zh_CN.UTF-8 ?



Are they the same locale ?



Run locale command:



LANG=zh_CN.UTF-8  
LANGUAGE=
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8


Run locale -a command:



C  
C.UTF-8
en_AG
en_AG.utf8
POSIX
zh_CN.gbk
zh_CN.utf8
POSIX


Anther two question:



What is the difference between C and C.UTF-8 ?

What is the difference between en_AG and en_AG.UTF-8 ?


More From » locale

 Answers
7

The file /usr/share/i18n/SUPPORTED lists locales that are supported in Ubuntu with their correct names along with encoding.




  • zh_CN.UTF-8 is the correct name, and zh_CN.utf8 is an alias that refers to the same locale.

  • C, unlike C.UTF-8, enables usascii encoding.

  • en_AG is the correct name, even if en_AG.UTF-8 is a working locale name that refers to the same locale.


[#27909] Monday, November 28, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dersol

Total Points: 78
Total Questions: 100
Total Answers: 124

Location: Christmas Island
Member since Mon, Oct 19, 2020
4 Years ago
;