Bug 37694 - Uploading files in distribution: Umlauts do not work
Uploading files in distribution: Umlauts do not work
Status: REOPENED
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: Ammar Najjar
:
Depends on: 36846 37823
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-05 09:51 CET by Florian Best
Modified: 2023-10-20 14:15 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Internationalization
Max CVSS v3 score:


Attachments
things (1.60 KB, patch)
2015-02-06 15:02 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-02-05 09:51:50 CET
We need a test script which uploads files in different encodings. The test script must check if the recipient got a copy of that file in e.g. /home/$OU/$schueler/$uid/$Unterrichtsmaterial/$project_name/.

Please use at least the following bytes as filename:
>>> u'→'.encode('UTF-8')
'\xe2\x86\x92'
>>> u'Ä'.encode('UTF-8')
'\xc3\x84'
>>> u'Ä'.encode('ISO8859-1')
'\xc4'

If you have questions, ask me!

+++ This bug was initially created as a clone of Bug #36846 +++

Files with umlauts in their name do not work in distribution. They do not show up in the file system after uploading (but they are saved somehow).

Interestingly, this action (uploading an umlaut containing file) *distributes an undistributed project* immediately.

Firefox. Filename was "companyName_ Wichtige Änderung.PDF"
Comment 1 Ammar Najjar univentionstaff 2015-02-06 10:04:07 CET
A new test script is created with the name "18_distribute_materials_encoding" to test the mentioned cases of using special characters in file names.

Test script disabled (skipped) for now, please enable after bug #36846 is fixed.
Comment 2 Florian Best univentionstaff 2015-02-06 10:25:29 CET
As discussed:
Please add a 3rd filename where only 'Ä'.encode('UTF-8') is used without '→' (so that we have characters which are contained in both encodings).
The duplicated lines have to be removed, leave utf-8:
# -*- coding: ISO8859-1 -*-
# -*- coding: utf-8 -*-

Also please use u'\u2192' and u'\xc4' instead of u'Ä' and u'→', so that it can't fail when the file encoding changes (even if it is specified in the header).
Comment 3 Ammar Najjar univentionstaff 2015-02-06 10:32:36 CET
(In reply to Florian Best from comment #2)
> As discussed:
> Please add a 3rd filename where only 'Ä'.encode('UTF-8') is used without '→'
> (so that we have characters which are contained in both encodings).
> The duplicated lines have to be removed, leave utf-8:
> # -*- coding: ISO8859-1 -*-
> # -*- coding: utf-8 -*-
> 
> Also please use u'\u2192' and u'\xc4' instead of u'Ä' and u'→', so that it
> can't fail when the file encoding changes (even if it is specified in the
> header).

small typo: u'\\u2192', u'\\xc4'.
Done.
Comment 4 Florian Best univentionstaff 2015-02-06 10:42:11 CET
No, this was not a typo. \\ would escape it again.
Comment 5 Florian Best univentionstaff 2015-02-06 15:02:47 CET
Created attachment 6651 [details]
things

Please also add the things from the attached patch.
Comment 6 Ammar Najjar univentionstaff 2015-02-10 08:58:17 CET
(In reply to Florian Best from comment #5)
> Created attachment 6651 [details]
> things
> 
> Please also add the things from the attached patch.

Done.

The script is modified to accept an additional encoding parameter with each passed filename.

Commited to svn repo only.
Comment 7 Florian Best univentionstaff 2023-07-03 12:38:05 CEST
There were code pushed which was never finished:

a01bedfc3 Bug #37694: use utf8 encoding in the meta section
921e94acd Bug #37694: disabling the script till Bug #36846 is fixed
a56831dab Bug #37694: add encoding to the files attribute
2e5899b70 Bug #37694: use character repr, add more filenames with encodes
844616f51 Bug #37694: initial commit
Comment 8 J Leadbetter univentionstaff 2023-10-20 14:06:11 CEST
Confirming that this is still an issue in UCS@school 5.0-5.