Bug 119236 - cannot encode track names with colons (:)
Summary: cannot encode track names with colons (:)
Status: RESOLVED DUPLICATE of bug 97305
Alias: None
Product: kaudiocreator
Classification: Applications
Component: general (show other bugs)
Version: 1.12
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Gerd Fleischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-30 13:47 UTC by Josiah Barber
Modified: 2007-09-11 17:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josiah Barber 2005-12-30 13:47:30 UTC
Version:           1.12 (using KDE 3.4.3, Gentoo)
Compiler:          gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
OS:                Linux (x86_64) release 2.6.14-gentoo-r5-default

When ripping/encoding a 14 track CD, tracks 9 and 10 were retrieved from the freedb as follows:

 9 Variation I: Andante
10 Variation II: Andante moderato

These two tracks failed to encode, while the others worked.

--Encoder Output--
lame --preset standard --tt 'Variation I: Andante' --ta 'Adolphe Adam' --tl 'Giselle (disc 2 of 2)' --ty '1900' --tn '09' --tg 'classical' '/tmp/kde-darshan/kaudiocreatorSvWepb.wav' '/mnt/shared/Music/ripped/Adolphe Adam/Giselle (disc 2 of 2)/Adolphe Adam - 09 - Variation I: Andante.mp3'


Can't init outfile '/mnt/shared/Music/ripped/Adolphe Adam/Giselle (disc 2 of 2)/Adolphe Adam - 09 - Variation I: Andante.mp3'
--End Encoder Output--

I tried renaming the tracks so that ':' became '\:' with the same results.  I then changed ':' to ' -' and they both worked fine.

Bug 58414 seems similar to this but was marked fixed over 2 1/2 years a go in an ancient version.

KAudioCreator should do something other than complaining that it couldn't encode the file in these cases.

Some options, in order of my preference:
- escape funky characters
- change or remove funky characters
- complain sooner
- at the very least, understand why encoding failed and give a more useful message.
Comment 1 David P James 2006-01-13 01:04:58 UTC
I see you're trying to output to /mnt - that wouldn't happen to be a Windows filesystem, would it? Because you can't create files on FAT filesystems with colons, semi-colons, slashes, question marks and probably a few others. You can do so in Linux though.
Comment 2 Josiah Barber 2006-01-13 13:48:29 UTC
Yes, you're right, it is a Windows (FAT32) filesystem.

It is probably a fairly common thing to be used with filesystems with these limitations, however.

The very least I would expect would be a more useful error message.  I am fairly bright person and realised that the 2 files that failed had colons in them, so I worked it out.  But this was the error message:

--Error Message--
The encoded file was not created.
Please check the encoder options.
The wav file has been removed.
Do you want to see the full encoder output?
--End Error Message--

With the encoder output as shown before.

So I would at least I would want KAudioCreator to do is when an encoded file is not created, check and see if there were any funny characters, and have a little hint in the error message after "The encoded file was not created", like "The filesystem you are writing to may not support some of the characters in the track name - you may want to change the track name in the CD Editor dialog"

Much better would be to simply try creating the file first, and if that doesn't work, do one of two things:

-Prompt the user explaining the situation and suggesting an alternate name that should work
-Just use a name that will work, without even bothering the user

It could be kept very simple.  If a filename doesn't work, replace any questionable characters with a hyphen or another safe character, and test again.  If it still isn't creatable, then die like you do now.

KAudioCreator is probably used with Windows filesystems fairly regularly, and there are probably other filesystems with similar limitations.  So it would be great to handle these situations seamlessly.
Comment 3 Richard Lärkäng 2007-09-11 17:03:02 UTC

*** This bug has been marked as a duplicate of 97305 ***