# 中文locale问题求助

## ahaau

怎么配置(regenerate?) zh_CN.GB2312，现在问题很多，比如，

export LC_ALL=zh_CN.GB2312

export LANG=zh_CN.GB2312

man gvim

 Failed to open the message catalog "man" for locale "zh_CN.GB2312"

 (NLSPATH="/usr/share/locale/%L/%N")

在zh_CN.GB2312下，gvim的中文（包括menu)全部是问号，gentoo怎么有这么低级的字体错误？

下面是我的xorg.conf的字体部分，Xorg.0.log显示这些字体都是有效的

Section "Files"

    RgbPath     "/usr/X11R6/lib/X11/rgb"

    FontPath    "/usr/share/fonts/misc"

    FontPath    "/usr/share/fonts/75dpi:unscaled"

    FontPath    "/usr/share/fonts/100dpi:unscaled"

    FontPath    "/usr/share/fonts/Type1"

    FontPath    "/usr/share/fonts/arphicfonts"

    FontPath    "/usr/share/fonts/zh-kcfonts"

    FontPath    "/usr/share/fonts/cyrillic"

    FontPath    "/usr/share/fonts/TTF"

        FontPath        "/usr/share/fonts/ttf/zh_CN"

        FontPath        "/usr/share/fonts/ttf/zh_TW"

EndSection

----------

## wangxiaohu

 *ahaau wrote:*   

> 怎么配置(regenerate?) zh_CN.GB2312，现在问题很多，比如，
> 
> export LC_ALL=zh_CN.GB2312
> 
> export LANG=zh_CN.GB2312
> ...

 

只要设置成zh_CN就可以了

----------

## EricHsu

 *ahaau wrote:*   

> gentoo怎么有这么低级的字体错误？
> 
> 

 

呵呵, 请不要因为自己的设置上的问题而怪罪于 gentoo  :Wink: 

看看我刚写完的这个帖子, 或许对你有帮助.

----------

## ahaau

zh_CN,还是?????

man gvim还是出错

奇怪呀奇怪

我在gnome-term, mozilla, gaim下的中文都没问题,就这个gvim气死人啦

btw, 

export LC_ALL=zh_CN.GB2312

gedit &

gedit works smoothly  :Sad:  what's going on

already several times "emerge -e system;emerge --newuse world", but gvim still shows ???? instead of Chinese characters.  :Sad:  I don't remember see ???? in debian for long

----------

## shyokou

It is NOT a good idea using mixed locales; but I DO think it is a good idea using a universal locale, UTF-8 ...

Man depends upon your locale heavily, so incorrect locale may give rise funny looking characters as you have seen.

You should check your locale settings, LC_*, and LANG. Generally speaking, it is idiot to change the default LC_* settings; just change LANG is enough for general purpose ...

Keep on learning and trying  :Smile: 

----------

## ahaau

it's not a problem of mixture, but zh_CN doesn't work properly

how to build (rebuild) zh_CN ?

that's what I need now. 

even if zh_CN does work, I'm afraid I would still face the gvim problem. all Chinese characters are just question masks ?????

gentoo doesn't provide much to do a simple rebuilding or troubleshooting

----------

## EricHsu

ahaau, have you tried to re-emerge your glibc and set the LC_ALL=zh_CN as suggested in my post? To know what locales your system supports, just run:

```

$ locale -a

```

You system locale could only be set to one of the locales listed by that command. To know more information, please read my post mentioned above  :Smile: 

----------

## meteozwh

ahaau，这个问题是出在这里，gvim所用的菜单，文字编码都是utf8的，如果你使用zh_CN.utf8的区域设置，就会看到gvim的菜单显示正常了。如果你不想切换区域设置，用这个办法也可以：

```
LC_ALL="zh_CN.utf8" gvim
```

不过这样可能会有其他问题，比如建立的中文文件不能顺利阅读，我最后的选择就是用英文版或者不用gvim。

----------

## ahaau

好象不是LC的问题

/etc/vim/vimrc里面zh_TW部分设有

  set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0

繁体中文显示正常

请问，简体中文该怎样设呢？

----------

## blackwhite

 *Quote:*   

> set fileencodings=gb2312
> 
> set encoding=euc-cn
> 
> set guifontset=-sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1,-misc-simsun-medium-r-normal--16-*
> ...

 

----------

