Univention Bugzilla – Bug 44352
Sanitize handling of encoding in S4-Connector
Last modified: 2020-07-03 20:56:48 CEST
Created attachment 8770 [details] latin1.patch The handling of encoding is not very consistent any more in the S4-Connector code. The attached patch is just cosmetic. In dns.py we probably could receive UTF-16-LE but we don't handle that. Also the naming of the helper functions is opposite to python standard: s4.encode(self, string) basically does a string.decode('latin1') encode_attrib(attrib) basically does a attrib.decode('utf8') IMHO all references to 'latin1' are not correct in the general case either. In particular "compatible_modstring" treats everything non-unicode as 'latin1'. For Bug 44276 I've added an idempotent function unicode_to_utf8 to avoid spreading the dreaded "compatible_modstring" even further.
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.