LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 854|回复: 11

关于MDV2006中perl使用时的locale的设置问题

[复制链接]
发表于 2005-10-31 20:05:59 | 显示全部楼层 |阅读模式
我在在使用perl时提示这样的错误:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN.GBK:zh_CN.GB2312:zh_CN:zh",
LC_ALL = "zh_CN.gbk",
LC_PAPER = "en_US",
LC_ADDRESS = "en_US",
LC_MONETARY = "en_US",
LC_SOURCED = "1",
LC_NUMERIC = "en_US",
LC_TELEPHONE = "en_US",
LC_MESSAGES = "zh_CN",
LC_IDENTIFICATION = "en_US",
LC_COLLATE = "zh_CN",
LC_MEASUREMENT = "en_US",
LC_CTYPE = "zh_CN",
LC_TIME = "zh_CN",
LC_NAME = "en_US",
LANG = "zh_CN.gbk"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

当我$locale 后
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_CN.gbk
LC_CTYPE="zh_CN.gbk"
LC_NUMERIC="zh_CN.gbk"
LC_TIME="zh_CN.gbk"
LC_COLLATE="zh_CN.gbk"
LC_MONETARY="zh_CN.gbk"
LC_MESSAGES="zh_CN.gbk"
LC_PAPER="zh_CN.gbk"
LC_NAME="zh_CN.gbk"
LC_ADDRESS="zh_CN.gbk"
LC_TELEPHONE="zh_CN.gbk"
LC_MEASUREMENT="zh_CN.gbk"
LC_IDENTIFICATION="zh_CN.gbk"
LC_ALL=zh_CN.gbk

我自己定义那些变量失败后,运行localedrake 设置语言,重启后还是失败,请问还有别的什么方法来解决这个问题吗?或者说应该怎样正确的设置locale呢?
不知道还有别人遇到过类似的问题吗?请高手指教一下
谢谢!
发表于 2005-10-31 20:29:30 | 显示全部楼层
你设的是自己的还是系统的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-31 21:02:55 | 显示全部楼层
自己的,
是不是要设为系统的。
使用export?
回复 支持 反对

使用道具 举报

发表于 2005-10-31 22:18:59 | 显示全部楼层
guji shi
回复 支持 反对

使用道具 举报

发表于 2005-11-1 09:38:15 | 显示全部楼层
说句话:Perl和locale是没有关系的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-1 21:08:37 | 显示全部楼层
设为系统的变量还是不行。

说句话:Perl和locale是没有关系的-------         请问该怎么改呢?
请指教一下
回复 支持 反对

使用道具 举报

发表于 2005-11-1 22:50:06 | 显示全部楼层
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

这个好象有问题,试试把它#了
回复 支持 反对

使用道具 举报

发表于 2005-11-1 22:54:06 | 显示全部楼层
你是运行的什么Perl
perl -v也有这个错误提示么?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-2 22:50:16 | 显示全部楼层
[beiune@localhost ~]$ perl -v
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "zh_CN.GBK:zh_CN.GB2312:zh_CN:zh",
        LC_ALL = "zh_CN.gbk",
        LC_PAPER = "en_US",
        LC_ADDRESS = "en_US",
        LC_MONETARY = "en_US",
        LC_SOURCED = "1",
        LC_NUMERIC = "en_US",
        LC_TELEPHONE = "en_US",
        LC_MESSAGES = "zh_CN",
        LC_IDENTIFICATION = "en_US",
        LC_COLLATE = "zh_CN",
        LC_MEASUREMENT = "en_US",
        LC_CTYPE = "zh_CN",
        LC_TIME = "zh_CN",
        LC_NAME = "en_US",
        LANG = "zh_CN.gbk"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

This is perl, v5.8.7 built for i386-linux
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2005, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
回复 支持 反对

使用道具 举报

发表于 2005-11-2 23:29:26 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表