always utf8 for radiotext
[enigma2.git] / lib / python / Components / Converter / RadioText.py
1 from Components.Converter.Converter import Converter
2 from Components.Element import cached
3
4 class RadioText(Converter, object):
5         def __init__(self, type):
6                 Converter.__init__(self, type)
7                 self.type = type
8
9         @cached
10         def getText(self):
11                 rt = self.source.radiotext
12                 text = ""
13                 if rt:
14                         if self.type == "RadioText":
15                                 text = rt.getRadioText()
16                 return text.decode("latin-1").encode("utf-8")
17         text = property(getText)