aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Gui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/Gui/GUIBase.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Mailman/Gui/GUIBase.py b/Mailman/Gui/GUIBase.py
index 95d7d177..67e79036 100644
--- a/Mailman/Gui/GUIBase.py
+++ b/Mailman/Gui/GUIBase.py
@@ -138,6 +138,14 @@ class GUIBase:
def _setValue(self, mlist, property, val, doc):
# Set the value, or override to take special action on the property
if not property.startswith('_') and getattr(mlist, property) <> val:
+ if property == 'preferred_language':
+ ocs = Utils.GetCharSet(getattr(mlist, property)) or 'us-ascii'
+ ncs = Utils.GetCharSet(val) or 'us-ascii'
+ odesc = getattr(mlist, 'description')
+ if ocs != ncs and not isinstance(odesc, unicode):
+ setattr(mlist, 'description',
+ Utils.xml_to_unicode(odesc, ocs).encode(
+ ncs, 'xmlcharrefreplace'))
setattr(mlist, property, val)
def _postValidate(self, mlist, doc):