View previous topic :: View next topic |
Author |
Message |
vagus n00b
Joined: 02 Jul 2004 Posts: 59
|
Posted: Mon Feb 07, 2005 12:02 pm Post subject: How do I display chinese file names under the console? |
|
|
I have couple of files on my /home dir with chinese names. I can read the chinese filenames under gnome and gnome-terminal without any problem.
But when I go into system console or when I remotely login to my computer through SSH with PuTTY, all I get are ???????????????? for the filenames. This becomes somewhat an irritation because I can't identify my chinese filenames remotely...
I basically followed this guide: http://www.gentoo.org/doc/en/utf-8.xml
But it didn't help me anyway. Can somebody please help? Thank you! |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Tue Feb 08, 2005 5:10 am Post subject: |
|
|
Please take a look at this thread (written in Chinese).
AFAIK, to properly display CJK characters in the console, there are "unicon" "zhcon" should be helpful...
Besides, I guess your PuTTY should support Chinese too... _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
vagus n00b
Joined: 02 Jul 2004 Posts: 59
|
Posted: Thu Feb 10, 2005 5:48 pm Post subject: |
|
|
Thanks for the reply.
My filenames and UTF coded, so I couldn't display them under zhcon...
I have fedora installed on my computer also. The thing that baffles me is that when I remotely access my files using PuTTY, I can read the chinese filenames under fedora. But I can't see chinese names for the same files under Gentoo, when I log in using PuTTY.
There must be something I have missed in my configuration somewhere... |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Sun Feb 13, 2005 3:38 am Post subject: |
|
|
vagus, could you post the result of the following commands (Fedora's and gentoo's):
Code: |
$ locale
$ locale -a
|
maybe we could get a clue from these... _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
blackwhite Apprentice
Joined: 24 Jun 2004 Posts: 250
|
Posted: Sun Feb 13, 2005 3:42 am Post subject: Re: How do I display chinese file names under the console? |
|
|
vagus wrote: | I have couple of files on my /home dir with chinese names. I can read the chinese filenames under gnome and gnome-terminal without any problem.
But when I go into system console or when I remotely login to my computer through SSH with PuTTY, all I get are ???????????????? for the filenames. This becomes somewhat an irritation because I can't identify my chinese filenames remotely...
I basically followed this guide: http://www.gentoo.org/doc/en/utf-8.xml
But it didn't help me anyway. Can somebody please help? Thank you! |
Actually, you should set putty support chinese. You check putty setting youself. It should work. |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Sun Feb 13, 2005 3:53 am Post subject: Re: How do I display chinese file names under the console? |
|
|
blackwhite wrote: |
Actually, you should set putty support chinese. You check putty setting youself. It should work. |
vagus wrote: |
when I remotely access my files using PuTTY, I can read the chinese filenames under fedora
|
seems that vagus' PuTTY already supports chinese... _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
vagus n00b
Joined: 02 Jul 2004 Posts: 59
|
Posted: Sun Feb 13, 2005 2:58 pm Post subject: |
|
|
Hello!
Here is my `locale` under Gentoo:
Code: | LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL= |
`locale -a`
Code: | C
POSIX
en_HK
en_US
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.utf8
zh_CN
zh_CN.gb2312
zh_CN.utf8
zh_HK.big5hkscs
zh_TW
zh_TW.big5
zh_TW.utf8 |
I am away from my computer now. I will post the fedora output once I go back. |
|
Back to top |
|
|
vagus n00b
Joined: 02 Jul 2004 Posts: 59
|
Posted: Mon Feb 14, 2005 2:28 pm Post subject: |
|
|
Ok guys. I have finally solved my problem partially.
For some reason the gentoo UTF-8 guide tells us to put the $LANG and $LC_ALL environment variables in ~/.profile. It didn't work for me. Instead, I now define these variables in ~/.bashrc. Now remote login gives me the filenames in Chinese!
My locale is now:
Code: | LANG=zh_CN.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
|
and my locale -a is now:
Code: | C
en_HK
en_US
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.utf8
POSIX
zh_CN
zh_CN.gb2312
zh_CN.utf8
zh_HK.big5hkscs
zh_TW
zh_TW.big5
zh_TW.utf8 |
I still do not know a way to display chinese filenames under the system console. Don't think zhcon can do the job. But even so, I am happy enough with what it is now. Thank you guys! |
|
Back to top |
|
|
blackwhite Apprentice
Joined: 24 Jun 2004 Posts: 250
|
Posted: Mon Feb 14, 2005 2:51 pm Post subject: |
|
|
Quote: | For some reason the gentoo UTF-8 guide tells us to put the $LANG and $LC_ALL environment variables in ~/.profile. |
I think ~/.profile should be .bash_profile . Definately, the .bashrc is also a good place.
BTW, I have a system without chinese support for I set locales.build wrong. But I can though ssh log on this computer, and display chinese, It seems that it does not depend on whether the computer supports chinese, just depends on your local computer's language support. |
|
Back to top |
|
|
EricHsu Bodhisattva
Joined: 03 May 2004 Posts: 591 Location: Aragon Consulting Group, Beijing, China
|
Posted: Tue Feb 15, 2005 1:26 pm Post subject: |
|
|
vagus wrote: | Ok guys. I have finally solved my problem partially.
For some reason the gentoo UTF-8 guide tells us to put the $LANG and $LC_ALL environment variables in ~/.profile. It didn't work for me. Instead, I now define these variables in ~/.bashrc. Now remote login gives me the filenames in Chinese!
|
Another more "gentoo way" (IMO) to set the env vars in the /etc/env.d/99local, run env-update and re-login
Quote: |
I still do not know a way to display chinese filenames under the system console. Don't think zhcon can do the job. But even so, I am happy enough with what it is now. Thank you guys! |
Have you tried the unicon patch for kernel? It's a kernel level support for displaying chinese charaters, maybe it would be helpful for you _________________ - http://nkbit.com
- http://twitter.com/xuyihua |
|
Back to top |
|
|
|