LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2009, 02:01 PM   #1
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Rep: Reputation: 15
Question 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
 
Old 09-11-2009, 02:08 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hi PlatinumX,

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

Markus
 
Old 09-11-2009, 02:25 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389
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.
 
Old 09-11-2009, 09:27 PM   #4
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by druuna View Post
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''.
 
Old 09-16-2009, 03:18 PM   #5
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
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
 
Old 09-16-2009, 03:32 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
env
 
Old 09-16-2009, 03:57 PM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by PlatinumX View Post
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
 
Old 09-16-2009, 03:59 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by Tinkster View Post
env
Which part of the env output? The only env output that looked related was LANG=en_IN
 
Old 09-17-2009, 09:38 AM   #9
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
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 ?
 
Old 09-17-2009, 10:22 AM   #10
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by PlatinumX View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash scripting: parsing a text file character-by-character Completely Clueless Programming 13 08-12-2009 09:07 AM
To know the function on checking whether a character is ascii or unicode character. murugesan Programming 2 01-23-2009 01:07 PM
rename last character in file/folder name BoraX Programming 9 10-26-2006 10:01 AM
remove folder that stats with a "special" character mago Linux - General 3 06-27-2006 04:40 PM
I have 8 character file name, no extension files being created in my dbaseIII+ folder bonzo Linux - General 2 01-22-2004 06:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration