Why is apostrophe in title replaced when naming downloaded art?

Issue #7149 new
Beeman Dev created an issue

I noticed that Launchbox replaces various characters from the title to generate a file system friendly name that it uses for naming the corresponding media. But why does it replace apostrophe? That character is allowed in file names and is present in many titles, especially nointro rom names and replacing them with _ means that downloaded launchbox artwork is no longer an exact match for the rom name.

After many years emu-dabbling I have come to the conclusion that title,rom,art,video etc all want to have the exact same name to avoid problems, but unless I say remove all apostrophe’s from the no intro names then there will always be a mismatch with downloaded LaunchBox art which renames art with these characters replaced by _ . I’m currently altering the LaunchBox titles to this (having to delete apostrophe) so that title, rom and art all name match as per function below (I put original LaunchBox name as an alternate title)

        public static string LBToNoIntro(this string s)
        {
            s = s.ToAscii(); //calls AnyAscii.Transliterate();
            s = Regex.Replace(s, @"^(A |An |The )", ""); // remove A, An, The from start

            s = s.Replace('/', '+') //replace chars with closer ones
                .Replace('\\', '+')
                .Replace(':', ';')
                .Replace('|', '-')
                .Replace('<', '[')
                .Replace('>', ']');

            s = Regex.Replace(s, @"[*?""'`]+", ""); // remove * ? " ' `
            s = Regex.Replace(s, @"[ \t]+", " "); //replace multiple space and tabs with single space
            return s.Trim(); //drop any leading/trailing spaces
        }