Univention Bugzilla – Attachment 10636 Details for
Bug 52878
Add turkish umlauts to list of umlauts that are converted to ASCII via <:umlauts>
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch (git:fbest/52878-unidecode-umlauts)
52878.patch (text/plain), 3.11 KB, created by
Florian Best
on 2021-03-09 10:53:07 CET
(
hide
)
Description:
patch (git:fbest/52878-unidecode-umlauts)
Filename:
MIME Type:
Creator:
Florian Best
Created:
2021-03-09 10:53:07 CET
Size:
3.11 KB
patch
obsolete
>commit a3cbbd107463a84af9fb183f4dc7b0e82d2ce2ab >Author: Florian Best <best@univention.de> >Date: Tue Mar 9 10:52:20 2021 +0100 > > Bug #52878: use unidecode for umlaut replacement > >diff --git management/univention-directory-manager-modules/debian/control management/univention-directory-manager-modules/debian/control >index 28b1fd538f..ed1bc31d9f 100644 >--- management/univention-directory-manager-modules/debian/control >+++ management/univention-directory-manager-modules/debian/control >@@ -27,6 +27,7 @@ Depends: > python-pyasn1-modules, > python-six, > python-smbpasswd, >+ python-unidecode, > python-univention (>= 12.0.1-1), > python-univention-directory-manager-cli (= ${binary:Version}), > python-univention-heimdal (>= 4.0.1-1), >@@ -86,6 +87,7 @@ Depends: > python3-pyasn1-modules, > python3-six, > python3-smbpasswd, >+ python3-unidecode, > python3-univention (>= 10.0.4-2), > python3-univention-directory-manager-cli (= ${binary:Version}), > python3-univention-heimdal (>= 4.0.1-1), >diff --git management/univention-directory-manager-modules/modules/univention/admin/__init__.py management/univention-directory-manager-modules/modules/univention/admin/__init__.py >index 7d23c67f61..62df0f9bf4 100644 >--- management/univention-directory-manager-modules/modules/univention/admin/__init__.py >+++ management/univention-directory-manager-modules/modules/univention/admin/__init__.py >@@ -39,6 +39,7 @@ import unicodedata > > import six > from ldap.filter import filter_format >+import unidecode > > import univention.config_registry > import univention.debug as ud >@@ -133,9 +134,7 @@ def pattern_replace(pattern, object): > elif iCmd == 'umlauts': > if isinstance(text, bytes): > text = text.decode('UTF-8') >- for umlaut, code in property.UMLAUTS.items(): >- text = text.replace(umlaut, code) >- >+ text = unidecode.unidecode(text) > text = unicodedata.normalize('NFKD', text).encode('ascii', 'ignore').decode('ascii') > elif iCmd == 'alphanum': > whitelist = configRegistry.get('directory/manager/templates/alphanum/whitelist', '') >@@ -191,70 +190,6 @@ def pattern_replace(pattern, object): > > > class property: >- UMLAUTS = { >- u'Ã': u'A', >- u'Ã': u'A', >- u'Ã': u'A', >- u'Ã': u'A', >- u'Ã': u'Ae', >- u'Ã': u'A', >- u'Ã': u'AE', >- u'Ã': u'C', >- u'Ã': u'E', >- u'Ã': u'E', >- u'Ã': u'E', >- u'Ã': u'E', >- u'Ã': u'I', >- u'Ã': u'I', >- u'Ã': u'I', >- u'Ã': u'I', >- u'Ã': u'D', >- u'Ã': u'N', >- u'Ã': u'O', >- u'Ã': u'O', >- u'Ã': u'O', >- u'Ã': u'O', >- u'Ã': u'Oe', >- u'Ã': u'O', >- u'Ã': u'U', >- u'Ã': u'U', >- u'Ã': u'U', >- u'Ã': u'Ue', >- u'Ã': u'Y', >- u'Ã': u'P', >- u'Ã': u'ss', >- u'à ': u'a', >- u'á': u'a', >- u'â': u'a', >- u'ã': u'a', >- u'ä': u'ae', >- u'Ã¥': u'a', >- u'æ': u'ae', >- u'ç': u'c', >- u'è': u'e', >- u'é': u'e', >- u'ê': u'e', >- u'ë': u'e', >- u'ì': u'i', >- u'Ã': u'i', >- u'î': u'i', >- u'ï': u'i', >- u'ð': u'o', >- u'ñ': u'n', >- u'ò': u'o', >- u'ó': u'o', >- u'ô': u'o', >- u'õ': u'o', >- u'ö': u'oe', >- u'ø': u'o', >- u'ù': u'u', >- u'ú': u'u', >- u'û': u'u', >- u'ü': u'ue', >- u'ý': u'y', >- u'þ': u'p', >- u'ÿ': u'y' >- } > > def __init__( > self,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52878
: 10636