Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51074

Unable to download files with special characters in the name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.8.7
    • Files API
    • None
    • MOODLE_28_STABLE

      It is possible to upload a file with a plus or an en dash (–) in the name, however errors are returned when trying to download the files.

      If the filename contains a en dash the following error is displayed:
      Debug info:
      Error code: filenotfound
      Stack trace:
      • line 481 of \lib\setuplib.php: moodle_exception thrown
      • line 1964 of \lib\filelib.php: call to print_error()
      • line 4228 of \lib\filelib.php: call to send_file_not_found()
      • line 37 of \pluginfile.php: call to file_pluginfile()

      If the file contains a + then a 404 – File or directory not found is returned.

      Steps to reproduce problem:
      1a. Create a file named 'Simple Ideas – Writing for Drums.txt' (note that the dash is an en dash not a standard dash)
      2a. Upload the file into My Files
      3a. Try and download the file
      4a. See the filenotfound error

      1b. Create a file named 'Simple Ideas + Writing for Drums.txt'
      2b. Upload the file into My Files
      3b. Try and download the file
      4b. See 404 error.

      We are running Moodle on a Windows 2008 R2 server under IIS.

      In regards to the question what is a en dash, it is a longer dash than normal dash. Microsoft word will often convert a dash to an en dash automatically.

      • dash
        – en dash
        — em dash

            Unassigned Unassigned
            tracyb@stpeters.school.nz Tracy Briscoe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.