Personal computing discussed

Moderators: renee, David, Thresher

 
Crayon Shin Chan
Minister of Gerbil Affairs
Topic Author
Posts: 2313
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia
Contact:

Weird filename behaviour

Fri Oct 23, 2015 9:02 am

Sometimes, when I have weird characters in the filename, this happens:
andrewchiw@makinami /Volumes/TOURO/music/Minecraft - Volume Alpha $ ls
ls: 09 - Oxygène.mp3: No such file or directory
ls: 10 - Équinoxe.mp3: No such file or directory
01 - Key.mp3 14 - Clark.mp3
02 - Door.mp3 15 - Chris.mp3
03 - Subwoofer Lullaby.mp3 16 - Thirteen.mp3
04 - Death.mp3 17 - Excuse.mp3
05 - Living Mice.mp3 18 - Sweden.mp3
06 - Moog City.mp3 19 - Cat.mp3
07 - Haggstrom.mp3 20 - Dog.mp3
08 - Minecraft.mp3 21 - Danny.mp3
11 - Mice on Venus.mp3 22 - Beginning.mp3
12 - Dry Hands.mp3 cover_front.jpg
13 - Wet Hands.mp3

I can't open tracks 9 and 10, but apparently the filesystem knows about them? Are they there are not?
Mothership: FX-8350, 12GB DDR3, M5A99X EVO, MSI GTX 1070 Sea Hawk, Crucial MX500 500GB
Supply ship: [email protected], 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Thinkpad X230
 
notfred
Maximum Gerbil
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Weird filename behaviour

Fri Oct 23, 2015 9:38 am

They are there but it's having problems with the non-ascii characters. What's the filesystem type and options? And what do you want to do beyond 'ls'?
 
Crayon Shin Chan
Minister of Gerbil Affairs
Topic Author
Posts: 2313
Joined: Fri Sep 06, 2002 11:14 am
Location: Malaysia
Contact:

Re: Weird filename behaviour

Fri Oct 23, 2015 10:01 am

It's an exFAT, and the machine is a Mac. So UTF-16 encoded filenames. Shouldn't be anything wrong, right?

I want to open them too! Not rename them though.
Mothership: FX-8350, 12GB DDR3, M5A99X EVO, MSI GTX 1070 Sea Hawk, Crucial MX500 500GB
Supply ship: [email protected], 12GB DDR3, M4A88TD-V EVO/USB3
Corsair: Thinkpad X230
 
notfred
Maximum Gerbil
Posts: 4610
Joined: Tue Aug 10, 2004 10:10 am
Location: Ottawa, Canada

Re: Weird filename behaviour

Fri Oct 23, 2015 10:13 am

Wikipedia says that ExFAT supports Unicode UTF-16 characters so you should be good to go.

You say this is on a Mac rather than a Unix box so I;'ll move this over to the Apple Sanctuary forum and someone there may know.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Weird filename behaviour

Sat Oct 24, 2015 7:29 am

I'm not much of a Mac guy, but in my experience (mostly Windows and Linux) Unicode in file names is a major PITA even if the underlying file system technically supports it. Unicode in file/directory names confuses tools and applications, resulting in situations like the one you've encountered here where 'ls' apparently knows the file is there, but doesn't know what to do with it.

My recommendation is to rename the files so that they contain only characters from the 7-bit ASCII character set, but preserve the original Unicode track names in the meta-data. That way, at least you'll limit the potential breakage to tools that explicitly display or manipulate MP3 meta-data. (And in my experience, Unicode in media file meta-data actually tends to be handled fairly well in most cases.)

Hopefully 'mv' can deal with the Unicode names. Otherwise, you'll need to write a short C program to do the rename for you.
Nostalgia isn't what it used to be.
 
bthylafh
Maximum Gerbil
Posts: 4320
Joined: Mon Dec 29, 2003 11:55 pm
Location: Southwest Missouri, USA

Re: Weird filename behaviour

Sat Oct 24, 2015 8:57 am

Or simply rename it in the GUI.
Hakkaa päälle!
i7-8700K|Asus Z-370 Pro|32GB DDR4|Asus Radeon RX-580|Samsung 960 EVO 1TB|1988 Model M||Logitech MX 518 & F310|Samsung C24FG70|Dell 2209WA|ATH-M50x
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Weird filename behaviour

Sat Oct 24, 2015 8:59 am

bthylafh wrote:
Or simply rename it in the GUI.

If the GUI doesn't choke on it too. I went with CLI since the OP used CLI in his example.
Nostalgia isn't what it used to be.
 
SnowboardingTobi
Gerbil Team Leader
Posts: 276
Joined: Wed May 21, 2003 10:56 am
Location: in your house, on the toilet, reading the newspaper
Contact:

Re: Weird filename behaviour

Sat Oct 24, 2015 10:39 am

Just for kicks, I wonder if a symlink would work? Since you don't want to rename the file... reference it with a symlink.
///_-)

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On