diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 86dc3e9..a14647c 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,6 +1,11 @@ Changelog ========= +2.4 - (2022-11-15) +--------------------------- +* Change: Restore old encoding for restapi + [iulianpetchesi refs #153129] + 2.3 - (2022-11-14) --------------------------- * Change: Rename controlpanel id to avoid conflicts with plone.formwidget.geolocation diff --git a/eea/geolocation/restapi/get.py b/eea/geolocation/restapi/get.py index 307e0cb..f3a90b6 100644 --- a/eea/geolocation/restapi/get.py +++ b/eea/geolocation/restapi/get.py @@ -59,7 +59,7 @@ def reply(self): vocabulary = taxonomy.makeVocabulary('en') for value, key in vocabulary.iterEntries(): - value = value.encode('latin-1', 'ignore').decode('latin-1') + value = value.encode('ascii', 'ignore').decode('ascii') if identifier not in value: identifier = value @@ -88,7 +88,7 @@ def reply(self): data = {} for value, key in vocabulary.iterEntries(): - value = value.encode('latin-1', 'ignore').decode('latin-1') + value = value.encode('ascii', 'ignore').decode('ascii') if identifier not in value: identifier = value @@ -121,7 +121,7 @@ def reply(self): vocabulary = taxonomy.makeVocabulary('en') for value, key in vocabulary.iterEntries(): - value = value.encode('latin-1', 'ignore').decode('latin-1') + value = value.encode('ascii', 'ignore').decode('ascii') if identifier not in value: identifier = value diff --git a/eea/geolocation/version.txt b/eea/geolocation/version.txt index bb576db..6b4950e 100644 --- a/eea/geolocation/version.txt +++ b/eea/geolocation/version.txt @@ -1 +1 @@ -2.3 +2.4