Files can't open if the file name contains swedish characters

Files can't open if the file name contains swedish characters

by Braco Veletanlic -
Number of replies: 6

Hi everyone

This is my first post. We have a problem with file names containing swedish characters åäö. These can without any problems be uploaded to moodle but trying to open them results in "Sorry, the requested file could not be found" message. The files are saved and shown in Moodle with the special characters in their file name. If we rename the file to ordinary letters the file opens without any problems at all. The moodle version we have is  2.1.1+ (Build: 20110811).

Best wishes

Braco

Average of ratings: -
In reply to Braco Veletanlic

Re: Files can't open if the file name contains swedish characters

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Which we browser are you using? The problem may be what happens at your end of the download, not at the Moodle end.

If that is not it, I would use the Firefox Firebug plugin's Net panel to inspect exactly what the download is doing.

In reply to Tim Hunt

Re: Files can't open if the file name contains swedish characters

by Braco Veletanlic -

Thank you for your answer Tim

I have used IE9, Firefox and Chrome with the same result.

 

In reply to Braco Veletanlic

Re: Files can't open if the file name contains swedish characters

by Maxime Taisne -

Hi guys!

I have the same problem with french characters like é, è, ê, à, ç, ï.

For instance when I want to download a file whose filename is : "filename with é", I get this error:

No valid arguments supplied or incorrect server configuration

But the URL is :

http://www.mymoodleaddress/pluginfile.php/13619/mod_resource/content/4/filename%20with%20é

The character "é" remains instead of being converted into some code beginning with %.

Hope this helps!

Cheers!

In reply to Maxime Taisne

Re: Files can't open if the file name contains swedish characters

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
"The filename is metadata about a file; a string used to uniquely identify a file stored on the file system. Different file systems impose different restrictions on length and allowed characters on filenames." http://en.wikipedia.org/wiki/Filename

A safe set would be:
- a-z
- A-Z
- 0-9
- _ (underscore)
- - (hyphen, but not as the first character)
- . (dot, also not as the first character)

In reply to Maxime Taisne

Re: Files can't open if the file name contains swedish characters

by Petr Skoda -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Hello,

I suppose you are using IIS, right? The problem is in the way you enabled slasharguments, some are compatible with unicode chars some are not (depending if it uses legacy DOS encodings). The only solution is to reconfigure your IIS, I once did it right, but I do not remember the details. The IIS is getting better PHP support with each release, you should probably try the latest PHP platform installer from MS first on a test server.

Here is an outdated docs page, I guess you do not need any third party rewriting solution any more: http://docs.moodle.org/20/en/Installation_for_Windows_2003_with_IIS

Petr
In reply to Petr Skoda

Re: Files can't open if the file name contains swedish characters

by Maxime Taisne -

Hi all,

I have finally found the solution to my problem! I have just had to uncheck Use Slash Arguments under Site Administration > Server > HTTP and now I can download files with special characters in the filename! smile

Cheers!