-from Components.Converter.Converter import Converter
-from Components.Element import cached
-
-class RadioText(Converter, object):
- def __init__(self, type):
- Converter.__init__(self, type)
- self.type = type
-
- @cached
- def getText(self):
- rt = self.source.radiotext
- text = ""
- if rt:
- if self.type == "RadioText":
- text = rt.getRadioText()
- return text.decode("latin-1").encode("utf-8")
- text = property(getText)
#include <string>
#include <lib/service/servicedvb.h>
#include <lib/service/service.h>
+#include <lib/base/estring.h>
#include <lib/base/init_num.h>
#include <lib/base/init.h>
#include <lib/base/nconfig.h> // access to python config
switch(x)
{
case 0:
- return m_radiotext_parser->getCurrentText();
+ return convertLatin1UTF8(m_radiotext_parser->getCurrentText());
}
return "";
}
{
PyObject *tuple = PyTuple_New(2);
char desc[20];
- sprintf(desc, "Page %x", *i);
+ sprintf(desc, "Page %d", *i);
PyTuple_SetItem(tuple, 0, PyString_FromString(desc));
PyTuple_SetItem(tuple, 1, PyInt_FromLong(*i));
PyList_Append(l, tuple);