[vdr] Announce LoadEPG 0.1.11

Luca Olivetti luca at ventoso.org
Sat Jul 28 11:25:48 CEST 2007


En/na Luca Olivetti ha escrit:

> If I change the function cLoadepgOsd::SwitchToEpgChannel (and only that 
> function) to use cDevice::PrimaryDevice() to do the switching then 
> everything works as expected (well, special characters show up as little 
> squares in accents in the epg, but I'll look into that).

I made a crude hack: I assume that the epg is in ISO-8859-15, so if 
SystemCharacterTable is different than iso-8859-15, I call iconv to 
convert the file in cLoadepgOsd::SaveEpg, just before the LoadFile label:

         fclose( File );
         const char *syschar=cCharSetConv::SystemCharacterTable();
         if (syschar==NULL || !strcasestr(syschar, "ISO-8859-15")) {
             char *cmd;
             asprintf(&cmd, "iconv -f ISO-8859-15 -t %s -o 
\"%s.converted\" \"%s\"", syschar ? syschar : "UTF-8",FileName,FileName);
             SystemExec(cmd);
             free(cmd);
             asprintf(&cmd, "mv \"%s.converted\" \"%s\"", 
FileName,FileName);
             SystemExec(cmd);
             free(cmd);
         }
     }
     LoadFile:;






More information about the vdr mailing list