General developer forum

Encoding problem with moodle moved from linux to windows

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Peter Eliyahu Kornfeld
Encoding problem with moodle moved from linux to windows


We have a moodle running on ubuntu, that for some reasons had to be moved to windows.

We zipped the folders, exported the db and reversed all on the windows machine.

After minor changes to config.php the site was up and running.

It take a while to recognized that the moodle on the windows can't handle non-english (in our case hebrew) file names...

We pinnded down the problem to the urldecode inside get_file_argument in /lib/weblib.php (the non-english chars are removed...). Also found a way to owercome this problem by changing /mod/resource/view.php at line 94


$fullurl = moodle_url::make_file_url('/pluginfile.php', $path, $displaytype == RESOURCELIB_DISPLAY_DOWNLOAD);


$fullurl = new moodle_url('/pluginfile.php'array('file' => $path'forcedownload' => $displaytype == RESOURCELIB_DISPLAY_DOWNLOAD));

The difference that in the second case urldecode never takes place and can't spoil the file name.

The question is, does anyone have a explanation what went wrong while moving from linux to windows?




On a second attempt I installed - from scratch - an other instance of moodle on the same machine and found that non-english file names are prohibited either way. So it isn't related to the moving phase but to moodle at-glance. I intend to open a bug report, but eager to see if there is someone experienced with this problem, so i give a few days to see...

Average of ratings: -