Univention Bugzilla – Bug 25112
Kodierung für Umlaute überprüfen
Last modified: 2014-11-28 10:13:47 CET
Im Neustart-Modul traten Problem mit Umlauten auf (siehe Bug 22848), diese wurden bei der Rückgabe an das Frontend nicht richtig kodiert. Es kann noch einmal generell für andere Module (bspw. System-Setup) überprüft werden, ob dort entsprechenden Meldungen (auch Fehlermeldungen?) korrekt kodiert an das Frontend übergeben werden.
Ergänzung: Die vom Frontend erhaltenen Strings konnten (wenn darin Umlaute enthalten waren) nicht ohne Weiteres in Python benutzt werden. Das subprocess-Modul verursachte Probleme, als man 'shutdown -r now -m $string_vom_frontend' aufgerufen hat -- .encode('utf-8') verschaffte Abhilfe.
This is because we are using simplejson to decode the received bytes. simplejson returns a python str if the input is pure ascii but unicode if it contains e.g. umlauts. subprocess, file.write, etc. expects to get str(bytes) not unicode and will therefore raise an exception.
This is not a bug. See comment #1 and #2.