Should special characters be supported in file names?

  • I recently tried to add a new video to my Kodi database. I added the file in my mounted folder and then asked kodi to re-scan. When it got to this new file, kodi crashed and re-started. In looking at the logs I saw this:

    2024-04-22 13:37:18.613 T:1135 warning <general>: VideoInfoScanner: Error 1 occurred while retrievinginformation for sftp://192.168.6.200:22/video/Blu/Music Videos/abcdefg..n/abcdefg..n.mkv.

    I had a special character in a couple places. The ".." in the above filename should have been an á. I replaced this as well as the title and the outline in the nfo file. Once this special character was fine, this file scraped just fine. Are special characters like this intentionally not supported?

  • I believe the character rules are defined in the general Linux filename vocabulary. I have had a few file errors pop up mostly with addons inserting ( and ) in mp3 filenames and sometimes in mkv files as well. Sometimes they cause no issues in LE or Kodi until I attempt a copy/move with the Kodi file manager. Maybe one of our Linux gurus can point us to the list of verbotten characters for future reference.

  • I ran into a problem 4 years ago, when I was hosting files via HTTP to Kodi. The bug was in Kodi, it's HTML parser was incomplete, it didn't handle character entities properly. It's possible the issue is with your SFTP server, or in the SFTP vfs component in Kodi, a bit hard to say.

    I can tell you what does work fine, with UTF-8 encoded file names, ampersands, quotes, dashes, etc, etc, etc is NFS. You might want to start with using sftp on your Kodi box (and perhaps your Windows PC or other computers) to see how the filename is presented. SFTP is supposed to be support UTF-8 encoded filenames.

  • Oh my what a can of worms. I did some checking and found this list which seems pretty complete for Linux and Windows however I also found left and right parenthesis are allowed in filenames KODI file manager dosen't like them and will cause errors. So possibly KODI's file manager has it's own set of filename rules. Here's the list I found:

    The forbidden printable ASCII characters are:

    Linux/Unix:

    / (forward slash)

    Windows:

    < (less than)
    > (greater than)
    : (colon - sometimes works, but is actually NTFS Alternate Data Streams)
    " (double quote)
    / (forward slash)
    \ (backslash)
    | (vertical bar or pipe)
    ? (question mark)
    * (asterisk)