{
std::transform(s.begin(), s.end(), s.begin(), (int(*)(int)) toupper);
}
+
+std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol)
+{
+ std::string out = in;
+ std::string::size_type loc = 0;
+ while (( loc = out.find(entity, loc)) != std::string::npos )
+ out.replace(loc, entity.length(), symbol);
+ return out;
+}
std::string removeDVBChars(const std::string &s);
void makeUpper(std::string &s);
+std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol);
inline std::string convertDVBUTF8(const std::string &string, int table=0, int tsidonid=0) // with default ISO8859-1/Latin1
{
invalidate(changed);
}
-std::string eSubtitleWidget::replace_all(const std::string &in, const std::string &entity, const std::string &symbol)
-{
- std::string out = in;
- std::string::size_type loc = 0;
- while (( loc = out.find(entity, loc)) != std::string::npos )
- out.replace(loc, entity.length(), symbol);
- return out;
-}
-
int eSubtitleWidget::event(int event, void *data, void *data2)
{
switch (event)
gRegion m_visible_region;
ePtr<gPixmap> m_pixmap; // pixmap to paint on next evtPaint
- std::string replace_all(const std::string &in, const std::string &entity, const std::string &symbol);
};
#endif
# nothing.
class ConfigNothing(ConfigSelection):
def __init__(self):
- ConfigSelection.__init__(self, choices = [""])
+ ConfigSelection.__init__(self, choices = [("","")])
# until here, 'saved_value' always had to be a *string*.
# now, in ConfigSubsection, and only there, saved_value
lang = cc; // use first found language
if (cc == lang)
{
- m_event_name = convertDVBUTF8(sed->getEventName(), table, tsidonid);
+ m_event_name = convertDVBUTF8(replace_all(replace_all(sed->getEventName(), "\n", " "), "\t", " "), table, tsidonid);
m_short_description = convertDVBUTF8(sed->getText(), table, tsidonid);
retval=1;
}
{
std::list<std::string> extensions;
extensions.push_back("ts");
+ extensions.push_back("trp");
sc->addServiceFactory(eServiceFactoryDVB::id, this, extensions);
}