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:
Error code: filenotfound
• 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.
– en dash
— em dash