Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: "Remove duplicates" case sensitivity (Read 2734 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

"Remove duplicates" case sensitivity

The current implementation of "Remove duplicates" function from "Edit" menu is case-sensitive, i.e. if an entry is added to the playlist, then the case of some characters in its path is changed and the same track is added again, it is considered a different entry. I recently stumbled upon this behavior, searched the forums and found that it was already reported a few years ago in this topic, but it seems like it was ignored.

If it's of any importance, I am using foobar2000 v. 1.2.9 on Windows XP.

I think this should be considered a bug, since Windows path handling is case-insensitive, and both playlist entries are technically pointing to the same file.

"Remove duplicates" case sensitivity

Reply #1
Conversely, the archive reader component subsequently retrieves files from archives using a case-insensitive matching algorithm, which makes it impossible to play all of the files in an archive created on a Unix system where there may be two files which only differ from each other in capitalization.

Also, it is actually possible to make Windows treat some or possibly all NTFS volumes in a case sensitive manner. And that is known to break a whole mess of software, not the least of which is many games which mix up capitalization of their own internal files throughout the code base, capitalizing it differently in one place or another. It is this reason that a number of semi-lazy Mac ports will opt to store all of their data files on a separate disk image formatted case insensitive, in case the user has installed their system to a case sensitive root partition. Saves them the effort of tracking down all the possible places some part of the game engine may programmatically generate filenames from differently capitalized string segments, in some way different from another piece of the game accessing the same exact files. Game programmers are sometimes screwy like that.

Yeah, making the redundant file check case insensitive will fix local paths on case insensitive systems, but has a possibility of breaking remote paths, as well as some archive paths, at least if case sensitivity is required for all edge cases. I don't really know for sure, though.

"Remove duplicates" case sensitivity

Reply #2
Also, it is actually possible to make Windows treat some or possibly all NTFS volumes in a case sensitive manner.


As far as I understand, for Win32 applications local filesystem access is always case-insensitive (although case-preserving), unless the application explicitly asks for case-sensitive operation. Correct me if I'm wrong.

Quote
Yeah, making the redundant file check case insensitive will fix local paths on case insensitive systems, but has a possibility of breaking remote paths, as well as some archive paths, at least if case sensitivity is required for all edge cases. I don't really know for sure, though.


Well, maybe make it configurable then? Add advanced settings like "Use case-sensitive path search for local volumes/remote volumes/archives", and use case-insensitive search/comparison for local paths and case-sensitive for remote paths and archives by default.

This, however, would require to perform volume/drive type checking for every playlist entry.

(I, personally, would be happy with a single option "Ignore case when looking for duplicate playlist entries").

"Remove duplicates" case sensitivity

Reply #3
Anyone have any updates on how to get around this? Apparently at some point Foobar decided to change the way it names folders on my paths. I don't know when, and it's not even all folders but now it's saving them exactly as they are and before it was saving them as capitalized when the folders were NOT capitalized.

"Remove duplicates" case sensitivity

Reply #4
Apparently at some point Foobar
Which part of it?

Quote
decided to change the way it names folders on my paths.
When does foobar2000 name which folders?

Quote
I don't know when, and it's not even all folders but now it's saving them
What do you mean by “saving”?

Only when the situation is explained properly will we be able to suggest answers.

"Remove duplicates" case sensitivity

Reply #5
Anyone have any updates on how to get around this? Apparently at some point Foobar decided to change the way it names folders on my paths. I don't know when, and it's not even all folders but now it's saving them exactly as they are and before it was saving them as capitalized when the folders were NOT capitalized.

1. save playlist in .m3u format
2. load .m3u list in any advanced text redactor (I use TextPad)
3. sort and remove duplicates - takes 10 seconds max.

One caveat: m3u format is poor in recognizing non-standard ASCII symbols, so by saving playlist in this format accent (Ñ) or special characters (×) will be replaced by non-accent ones (N) or by question marks (?) - and this will render paths and file names as incorrect.