Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I display chinese file names under the console?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
vagus
n00b
n00b


Joined: 02 Jul 2004
Posts: 59

PostPosted: Mon Feb 07, 2005 12:02 pm    Post subject: How do I display chinese file names under the console? Reply with quote

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
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Feb 08, 2005 5:10 am    Post subject: Reply with quote

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
View user's profile Send private message
vagus
n00b
n00b


Joined: 02 Jul 2004
Posts: 59

PostPosted: Thu Feb 10, 2005 5:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Sun Feb 13, 2005 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Sun Feb 13, 2005 3:42 am    Post subject: Re: How do I display chinese file names under the console? Reply with quote

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
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Sun Feb 13, 2005 3:53 am    Post subject: Re: How do I display chinese file names under the console? Reply with quote

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
View user's profile Send private message
vagus
n00b
n00b


Joined: 02 Jul 2004
Posts: 59

PostPosted: Sun Feb 13, 2005 2:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
vagus
n00b
n00b


Joined: 02 Jul 2004
Posts: 59

PostPosted: Mon Feb 14, 2005 2:28 pm    Post subject: Reply with quote

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! :D

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
View user's profile Send private message
blackwhite
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 250

PostPosted: Mon Feb 14, 2005 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Feb 15, 2005 1:26 pm    Post subject: Reply with quote

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! :D


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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum