Feature Wiki

Information about planned and released features

Tabs

Filename Encoding

1 Requirements

Up to ILIAS 4.4 ILIAS suffers from various issues related to the enconding of filenames, when files are sent to the client or zipped.
 
We need a general concept that helps developers to avoid running into these kind of issues.
 
See bug report #12620 and all related reports and Normalization of Filenames.

1.1 UTF8 Filename Normalization

Killing, Alexander [alex], 9 Nov 2015: I did some tests on utf 8 normalization of filenames on upload, see bug #16337. This could be solved by calling UtfNormal::toNFC($a_filename); at the "right places".

2 Additional Information

  • Idea / concept:
  • Funding: Required
  • Maintainer: (will be set by Jour Fixe)
  • Implementation of the feature is done by (company, developer)
  • Tested by / status: (name, e-mail), (status information set after implementation)

3 Discussion

Alex Killing 24 Apr 2014: I am currently first maintainer of the file object, but this issue affects several components that use files and zip features. So I think this goes bayond the maintainership of the file object. Nevertheless and since I created the request myself, I strongly hope that we somehow are able to tackle this.

JF 21 July 2014: We postpone this topic to an upcoming release. We don't have enough funding/resources to finalize this concept for 4.5.

Heyser, Björn [bheyser], 11 Aug 2015:

There is an allready implemented method ilUtil::getASCIIFilename() to convert strings of any kind into a string useable for filenames. This method currently works as follows:

  • convert all characters that have a html entity representation in exactly this html entity (except quotes and double quotes)
    • Example: "ö" is converted into "ö"
    • Example: "©" is converted into "©"
  • convert all html entities into the first character of the entity
    • Example: "ö" is converted into "o"
    • Example: "©" is converted into "c"
  • convert all characters with a hex representation between 0x7f and 0xff into an underscore
  • convert all of the following characters into an underscore: 0x5c : / * ? " < > |
I think we should use this method. When it does not fit our requirements of nowadays the implementation can be changed.

Killing, Alexander [alex], 11 Aug 2015: Björn, yes, we have ilUtil::getASCIIFilename(). We are using this in some cases (exercises, media objects), but I do not consider this being a well designed file handling concept. Additionally there are cases that cannot be adressed (zip file issues, e.g.). So for some cases this may be ok as an intermediate workaround, but in the long run we to put more work into a better solution.

JourFixe, ILIAS [jourfixe], Nov 09, 2015: We highly appreciate an improvement of the file name handling as suggested by Alexander today and accept it as a bug fix for 5.1 (and probably earlier versions).

4 Implementation

...

Last edited: 9. Nov 2015, 14:50, Kunkel, Matthias [mkunkel]