export LANG不生效问题

以前发现export LANG=zh_CN.UTF-8不生效,一直不知道原因,直到在安装fontconfig时看到如下注释:

As a user, if your language has been installed for this package, you
only have to set the 'LANG' environment variable to the appropriate
'LL_CC' combination.  If you happen to have the 'LC_ALL' or some other
'LC_xxx' environment variables set, you should unset them before setting
'LANG', otherwise the setting of 'LANG' will not have the desired
effect.
 Here 'LL' is an ISO 639 two-letter language code, and 'CC' is
an ISO 3166 two-letter country code.  For example, let's suppose that
you speak German and live in Germany.  At the shell prompt, merely
execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in
'sh') or 'export LANG=de_DE' (in 'bash').  This can be done from your
'.login' or '.profile' file, once and for all.

   You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries.  For
example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil.  The
country code serves to distinguish the dialects.

   The locale naming convention of 'LL_CC', with 'LL' denoting the
language and 'CC' denoting the country, is the one use on systems based
on GNU libc.  On other systems, some variations of this scheme are used,
such as 'LL' or 'LL_CC.ENCODING'.  You can get the list of locales
supported by your system for your language by running the command
'locale -a | grep '^LL''.

也就说说如果export LANG时不生效,要么是设置了LC_ALL或者LC_XXX环境变量覆盖了LANG变量,要么是使用的shell不支持export方式 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值