When working on *nix system, I always set the locale as en_US.UTF-8, and then this can help me display the Chinese correctly on the stdout.
But I know that there is also zh_CN.UTF-8 for locale setting as well, so I want to know:
What the the different of them?
When should I use zh_CN.UTF-8 or en_US.UTF-8?  
Having zero knowledge about zh in itself, changing between the two locales you mentioned may change how certain characters are treated at a word boundary and how different programs produce output.
For example LC_CTYPE=zh_CN.UTF-8 will most likely consider characters with accent marks as "being part of a word" whereas LC_CTYPE=en_US.UTF-8 might not consider those being part of a word.
Same goes for date and currency formats. As I'm pretty sure zh will have different date/currency format than us.
To give you a concrete example, here is what I get from date(1) with two different locales in a relatively recent Ubuntu GNU/Linux system:
user@devbook:~$ LC_TIME=fi_FI.UTF-8 date
to 16.1.2014 07.14.36 +0200
user@devbook:~$ LC_TIME=en_US.UTF-8 date
Thu Jan 16 07:14:42 EET 2014
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With