I have a website that allows users to upload pictures. To reduce the amount of space used by pictures files on my site, I attempted to use a script to remove orphaned files. However, this script chokes on Unicode file names; there are dozens of pictures with Unicode file names on my site:
query:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Adorable Kitty EDIT.jpg'' at line 1
I have enabled the Transliteration module so that new files will not have this problem. However, what can I do about the old files? Is there a way to change their names and update the Drupal DB? I am willing to do this manually if necessary, but I don't know how to approach this.
EDIT: Upon closer inspection, the problem is not unicode, it's the quote marks in the filename.