Univention Bugzilla – Bug 37694
Uploading files in distribution: Umlauts do not work
Last modified: 2023-10-20 14:15:53 CEST
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"
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.
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).
(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.
No, this was not a typo. \\ would escape it again.
Created attachment 6651 [details] things Please also add the things from the attached patch.
(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.
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
Confirming that this is still an issue in UCS@school 5.0-5.