[问题]locale在哪儿怎么配置才能用fcitx?

系统字体配置、中文显示和输入法问题
回复
inkscape
帖子: 8
注册时间: 2007-06-23 20:00

[问题]locale在哪儿怎么配置才能用fcitx?

#1

帖子 inkscape » 2007-06-24 10:19

fcitx的状态条是灰色,不能输入中文,桌面是中文KDE。

$ 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.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

请问怎么设置呀?
雕啸长空
帖子: 1897
注册时间: 2006-09-12 14:09

#2

帖子 雕啸长空 » 2007-06-24 11:12

在/var/lib/locales/supported.d/下建一个文件,比如名为zh的文件,在里面加入如下内容

代码: 全选

en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8
zh_CN.GBK GBK
然后执行

代码: 全选

sudo locale-gen
试试,
附问题:你的系统是怎么安装的,X是怎么启动,*DM or startx?
Fair winds and following seas !
inkscape
帖子: 8
注册时间: 2007-06-23 20:00

#3

帖子 inkscape » 2007-06-24 11:25

kubuntu704,然后从KDE控制中心里装的中文支持,X是系统启动时进的,有时是注销回控制台用startx启动.
雕啸长空
帖子: 1897
注册时间: 2006-09-12 14:09

#4

帖子 雕啸长空 » 2007-06-24 11:38

尽量不要用这种混合方式启动X,因为两者所读取的配置文件不完全一样
我单用startx,所以需要建立~/.xinitrc这个文件,

注意这个是gentoo下的,仅供参考

代码: 全选

fideas@zerone ~ $ cat .xinitrc
#start kde at gentoo
source /home/fideas/.envset.sh && exec startkde
fideas@zerone ~ $ cat .envset.sh
export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
export XMODIFIERS=@im="fcitx"
export GTK_IM_MODULE="fcitx"
fcitx &
附:你有没有试二楼的方法?
Fair winds and following seas !
inkscape
帖子: 8
注册时间: 2007-06-23 20:00

#5

帖子 inkscape » 2007-06-24 11:45

晚上才能试,现在外面呢,我以前也用gentoo,有几年没用了,昨天捡到个硬盘,才拿出来装ubuntu玩玩,晚上试了看看。
雕啸长空
帖子: 1897
注册时间: 2006-09-12 14:09

#6

帖子 雕啸长空 » 2007-06-24 11:59

那就好讲了,看你顶楼的提示似乎是zh_CN.UTF-8的locale没有生成,二楼就是生成几个常用locale而已,相当于gentoo下的locale.gen,你可以按自己的需要写zh那个文件.
Fair winds and following seas !
inkscape
帖子: 8
注册时间: 2007-06-23 20:00

#7

帖子 inkscape » 2007-06-24 19:30

$ locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX



$ sudo locale-gen
Password:
Generating locales...
en_AU.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_BW.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_CA.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_DK.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_GB.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_HK.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_IE.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_IN.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_NZ.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_PH.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_SG.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_US.ISO-8859-1... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_US.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_ZA.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
en_ZW.UTF-8... cannot open locale definition file `iso14651_t1': Input/output error
failed
zh_CN.GB18030... cannot open locale definition file `zh_CN': Input/output error
failed
zh_CN.GB2312... cannot open locale definition file `zh_CN': Input/output error
failed
zh_CN.GBK... cannot open locale definition file `zh_CN': Input/output error
failed


???????????
inkscape
帖子: 8
注册时间: 2007-06-23 20:00

#8

帖子 inkscape » 2007-06-24 19:44

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN:zh",
LC_ALL = (unset),
LANG = "zh_CN.gbk"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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
(Reading database ... 82325 files and directories currently installed.)
Removing fcitx ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN:zh",
LC_ALL = (unset),
LANG = "zh_CN.gbk"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
回复