Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: skip iso8859-2 selection in EPG text



Kapoun Miloš wrote:
> 
> Hi.
> 
> Iso8859-2 character set selection in the text of ShortEvent descriptor is different, then others.
> When first byte is 0x10, next two bytes describes character set.
> For example: Firs three bytes "0x10,0,2" -> coding is iso8859-2.
> (ETSI EN 300 468 annex A "Coding of text characters")
> This patch is needed for Czech broadcasting (CRa) because
> string is terminated by the second byte.
> 
> Attached patch ignoring first three bytes when first byte is 0x10.
> 
> Milos
> 

>                    Name: si.c.diff
>    si.c.diff       Type: unspecified type (application/octet-stream)
>                Encoding: base64
>             Description: si.c.diff

You did the skip _inside_ the 'for' loop, which I'd say is wrong.
I'll make it so:

--- libsi/si.c  2004/10/16 09:54:05     1.12
+++ libsi/si.c  2004/10/16 15:12:57
@@ -251,6 +251,9 @@
    }
    */
 
+   if (*from == 0x10)
+      from += 3; // skips code table info
+
    for (int i = 0; i < getLength(); i++) {
       if (*from == 0)
          break;
@@ -275,6 +278,9 @@
    char *toShort=shortVersion;
    int IsShortName=0;
 
+   if (*from == 0x10)
+      from += 3; // skips code table info
+
    for (int i = 0; i < getLength(); i++) {
       if (*from == 0)
          break;


Klaus




Home | Main Index | Thread Index