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

Impossible use non-english characters in file's and folder's name

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.0
    • Component/s: Language, Libraries
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      All non-english (national) characters replace to _.

      This problem solved as follows:

      In file /lib/moodlelib.php

      function clean_filename($string)

      { $string = eregi_replace(\.\.+, , $string); // $string = preg_replace('/[^\.a-zA-Z\d\_-]/','_', $string ); // only allowed chars $string = preg_replace('/[^[:alnum:]\.-]/','_', $string ); // only allowed chars **but not only english** $string = eregi_replace(_+, _, $string); return $string; }

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            From Dmitry Pupinin (dlnsk at nspu.ru) Monday, 11 April 2005, 01:22 AM:

            Necessary else to correct file /files/index.php

            All changes in attachment!

            Additional changes:

            1. Color of message File upload success changed from red to green.

            2. User now can Choose folders (see #2880)

            Show
            dougiamas Martin Dougiamas added a comment - From Dmitry Pupinin (dlnsk at nspu.ru) Monday, 11 April 2005, 01:22 AM: Necessary else to correct file /files/index.php All changes in attachment! Additional changes: 1. Color of message File upload success changed from red to green. 2. User now can Choose folders (see #2880)
            Hide
            skodak Petr Skoda added a comment -

            the non-ascii file names should work in latest cvs version, thanks for the report

            Show
            skodak Petr Skoda added a comment - the non-ascii file names should work in latest cvs version, thanks for the report

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10