Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[unicode] how to operate unicode file/directory without X?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 318

PostPosted: Wed Feb 18, 2009 1:19 am    Post subject: [unicode] how to operate unicode file/directory without X? Reply with quote

Hi,

I have a gentoo 2008 which is setup as a server. I do not want to install X on it, since I do not need one. But now I have some problem operating Unicode files/directories. All the filenames are displayed as ??, so I have no way to access them. I cannot even copy them with cp *.

Those filenames are in Chinese/Japanese. I know it is impossible to display them correctly without X, or some kind of frame buffer console. Actually, I do not need to read them, I do not care if they're named properly.

What I really need is to copy/move the files, and cd into the directories.

Could anyone provide some idea on how to work this out?
_________________
David Shen
Back to top
View user's profile Send private message
pianosaurus
l33t
l33t


Joined: 19 Apr 2004
Posts: 944
Location: Bash$

PostPosted: Wed Feb 18, 2009 5:25 am    Post subject: Reply with quote

Globbing is not dependent on the display capabilities, so a command such as cp * ~/ should work just fine (I've done so myself on unreadable unicode filenames). If it doesn't, there is something else wrong.

If you can't select a particular file with the help of globbing, you can do something like this to create a neat menu:
Code:
cd "$(select A in *; do echo $A; break; done)"

But that would also require globbing to work.
_________________
PKA Cuber
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved.
Adopt an unanswered post
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 318

PostPosted: Wed Feb 18, 2009 8:34 am    Post subject: Reply with quote

Cuber wrote:
Globbing is not dependent on the display capabilities, so a command such as cp * ~/ should work just fine (I've done so myself on unreadable unicode filenames). If it doesn't, there is something else wrong.

If you can't select a particular file with the help of globbing, you can do something like this to create a neat menu:
Code:
cd "$(select A in *; do echo $A; break; done)"

But that would also require globbing to work.


Yep, I remember cp * works for me previously. But it reported error last time. I will check if your solution works for me.

Thanks :)
_________________
David Shen
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 318

PostPosted: Wed Feb 18, 2009 11:27 am    Post subject: Reply with quote

Cuber wrote:
Globbing is not dependent on the display capabilities, so a command such as cp * ~/ should work just fine (I've done so myself on unreadable unicode filenames). If it doesn't, there is something else wrong.

If you can't select a particular file with the help of globbing, you can do something like this to create a neat menu:
Code:
cd "$(select A in *; do echo $A; break; done)"

But that would also require globbing to work.


Finally, I found this is not a issue with linux. It should be a issue with the mount.cifs. The directory I was trying to copy is a share folder from windows. But the mount.cifs cannot handle unicode correctly, thus, on linux side, the Chinese/Japanese characters are displayed as ??, and the files/directories are not accessible.
_________________
David Shen
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Wed Feb 18, 2009 12:55 pm    Post subject: Reply with quote

davidshen84 wrote:

Finally, I found this is not a issue with linux. It should be a issue with the mount.cifs. The directory I was trying to copy is a share folder from windows. But the mount.cifs cannot handle unicode correctly, thus, on linux side, the Chinese/Japanese characters are displayed as ??, and the files/directories are not accessible.


While I don't use samba, I had to deal with enough filesystem encoding issues, to say much of above is FUD.
As far as I googled, if samba is recent enough, 'iocharset=utf8' should help.
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 318

PostPosted: Thu Feb 26, 2009 8:50 am    Post subject: Reply with quote

VoidMage wrote:
davidshen84 wrote:

Finally, I found this is not a issue with linux. It should be a issue with the mount.cifs. The directory I was trying to copy is a share folder from windows. But the mount.cifs cannot handle unicode correctly, thus, on linux side, the Chinese/Japanese characters are displayed as ??, and the files/directories are not accessible.


While I don't use samba, I had to deal with enough filesystem encoding issues, to say much of above is FUD.
As far as I googled, if samba is recent enough, 'iocharset=utf8' should help.


ok, I will try. thanks
_________________
David Shen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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