LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Character ? in the name of a folder (https://www.linuxquestions.org/questions/linux-newbie-8/character-in-the-name-of-a-folder-754461/)

PlatinumX 09-11-2009 02:01 PM

Character ? in the name of a folder
 
Hi all,

I copied a folder from a PC to another PC.
When I open the destination, i have a folder named Vid?o instead of Video.

With the shell, I can see it with a "ls" of the current folder.
But I can not enter the folder.
When I type "cd Vid?o" it does not work.

What should I do to be able to handle a folder with such a name ?

Do I miss a particular set of character ?

Thanks

markush 09-11-2009 02:08 PM

Hi PlatinumX,

have you tried "cd Vid" and then typing the tab-key? Another way is "cd Vid\" and then tab.

Markus

druuna 09-11-2009 02:25 PM

Hi,

The question mark (?) is a special character (the way bash sees it). It needs to be escaped to make it loose its special function.

I know of 2 ways of doing just that:

cd 'Vid?o' - single quotes. Bash does not touch anything within single quotes.
cd Vid\?o - The backslash "escapes" the ?, which tells bash not to touch it.

But for me the bigger question would be: How did Video become Vid?o......

Anyway, hope this helps.

w1k0 09-11-2009 09:27 PM

Quote:

Originally Posted by druuna (Post 3679151)
But for me the bigger question would be: How did Video become Vid?o......

It apparently was ``Vidéo'' in the first system. The second system doesn't use the same encoding as the first so ``Vidéo'' was renamed to ``Vid?o''.

PlatinumX 09-16-2009 03:18 PM

It seems it is about the encoding.
Right, the source folder was nammed "Vidéo".

Where can I check in my system the encoding mode ?
Thanks

Tinkster 09-16-2009 03:32 PM

env

catkin 09-16-2009 03:57 PM

Quote:

Originally Posted by PlatinumX (Post 3685756)
It seems it is about the encoding.
Right, the source folder was nammed "Vidéo".

Where can I check in my system the encoding mode ?
Thanks

The stty command may show it:
Code:

c@CW8:~$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
ixany iutf8
c@CW8:~$ echo Vidéo
Vidéo

Or maybe not!
Code:

c@CW8:~$ stty -iutf8
c@CW8:~$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
ixany
c@CW8:~$ echo Vidéo
Vidéo


catkin 09-16-2009 03:59 PM

Quote:

Originally Posted by Tinkster (Post 3685783)
env

Which part of the env output? The only env output that looked related was LANG=en_IN

PlatinumX 09-17-2009 09:38 AM

About the env, isn't there an international encoding charset supporting all characters ? like €,£,é,è.
Isn't UTF-32 capable of encoding the whole Unicode charset ?

lutusp 09-17-2009 10:22 AM

Quote:

Originally Posted by PlatinumX (Post 3687039)
About the env, isn't there an international encoding charset supporting all characters ? like €,£,é,è.
Isn't UTF-32 capable of encoding the whole Unicode charset ?

Yes, but so is UTF-8, and this is in much wider use. Here is the default value from Fedora 11:

Code:

$ echo $LANG
en_US.UTF-8

Maybe the OP should change this value and see if it helps.

BTW using UTF-32 in a system with UTF-8 content won't work -- they aren't the same.


All times are GMT -5. The time now is 10:13 PM.