when passing a broken utf-8 string, ignore characters. fixes #55.
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 12 Nov 2008 22:39:25 +0000 (23:39 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 12 Nov 2008 22:39:25 +0000 (23:39 +0100)
lib/python/Components/config.py

index 4ddcabe..4d57bbb 100755 (executable)
@@ -782,12 +782,12 @@ class ConfigText(ConfigElement, NumericalTextInput):
 
        def getValue(self):
                return self.text.encode("utf-8")
-               
+
        def setValue(self, val):
                try:
                        self.text = val.decode("utf-8")
                except UnicodeDecodeError:
-                       self.text = val
+                       self.text = val.decode("utf-8", "ignore")
                        print "Broken UTF8!"
 
        value = property(getValue, setValue)