VDR in Polish

Message ID d73d7acb0601170914q5c12fc41r@mail.gmail.com
State New
Headers

Commit Message

Jaroslaw Swierczynski Jan. 17, 2006, 5:14 p.m. UTC
  Hi. I've made an update to the Polish translation. Actually it's a
complete rewrite as the existing translation is horrible and unusable.
In order for Polish characters to be displayed correctly, also
epg_pl_0.1.diff is required (it's not mine, I've found it on one of
message boards). It fixes the ISO-8859-2 fonts and EPG data sent by
Cyfra+ (a Polish provider).

--
Jaroslaw Swierczynski <swiergot@gmail.com>
www.archlinux.org | www.juvepoland.com
  

Comments

Klaus Schmidinger Jan. 17, 2006, 5:19 p.m. UTC | #1
Jaroslaw Swierczynski wrote:
> Hi. I've made an update to the Polish translation. Actually it's a
> complete rewrite as the existing translation is horrible and unusable.
> In order for Polish characters to be displayed correctly, also
> epg_pl_0.1.diff is required (it's not mine, I've found it on one of
> message boards). It fixes the ISO-8859-2 fonts and EPG data sent by
> Cyfra+ (a Polish provider).

Hello Jaroslaw,

thanks for the update.
However, I'm not going to adopt the changes to epg.c for version 1.4,
because in version 1.5.x there will most likely be UTF-8 handling, and
then this would have to be changed, anyway.

So please let me know whether your patch to i18n.c will work without
the other changes. If it doesn't, I'll leave everything as it is right now.

Greetings
Klaus
  

Patch

--- fontosd-iso8859-2.c.org	Sat Dec 18 17:14:50 2004
+++ fontosd-iso8859-2.c	Thu Nov 24 09:55:09 2005
@@ -3948,23 +3948,23 @@ 
      0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
-     0x000001F0,  // ....*****....
-     0x000003F8,  // ...*******...
-     0x0000071C,  // ..***...***..
-     0x00000C0C,  // .**......**..
-     0x00000C06,  // .**.......**.
-     0x00000C06,  // .**.......**.
-     0x00000E00,  // .***.........
-     0x00000700,  // ..***........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000FE0,  // .*******.....
      0x00000FE0,  // .*******.....
-     0x00000FA0,  // .*****.*.....
-     0x00000380,  // ...***.......
-     0x00000180,  // ....**.......
-     0x00000180,  // ....**.......
-     0x00000300,  // ...**........
      0x00000600,  // ..**.........
-     0x00000FFE,  // .***********.
-     0x00000FFC,  // .**********..
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x00000600,  // ..**.........
+     0x000007FE,  // ..**********.
+     0x000007FE,  // ..**********.
      0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
@@ -4032,34 +4032,34 @@ 
      0x00000000,  // .............
   },
   {             // 166
-     6, 27,
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x00000000,  // ......
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
-     0x0000000C,  // ..**..
+     15, 27,
+     0x00000070,  // ........***....
+     0x000000E0,  // .......***.....
+     0x000001C0,  // ......***......
+     0x00000380,  // .....***.......
+     0x00000000,  // ...............
+     0x000003E0,  // .....*****.....
+     0x00000FF8,  // ...*********...
+     0x00000C1C,  // ...**.....***..
+     0x0000180C,  // ..**.......**..
+     0x00001804,  // ..**........*..
+     0x00001800,  // ..**...........
+     0x00001C00,  // ..***..........
+     0x00000F80,  // ...*****.......
+     0x000007F8,  // ....********...
+     0x0000007C,  // ........*****..
+     0x0000000E,  // ...........***.
+     0x00000006,  // ............**.
+     0x00003006,  // .**.........**.
+     0x00001806,  // ..**........**.
+     0x0000180C,  // ..**.......**..
+     0x00000FF8,  // ...*********...
+     0x000007F0,  // ....*******....
+     0x00000000,  // ...............
+     0x00000000,  // ...............
+     0x00000000,  // ...............
+     0x00000000,  // ...............
+     0x00000000,  // ...............
   },
   {             // 167
      13, 27,
@@ -4212,34 +4212,34 @@ 
      0x00000000,  // ..............
   },
   {             // 172
-     13, 27,
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000FFF,  // .************
-     0x00000FFF,  // .************
-     0x00000003,  // ...........**
-     0x00000003,  // ...........**
-     0x00000003,  // ...........**
-     0x00000003,  // ...........**
-     0x00000003,  // ...........**
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
+     14, 27,
+     0x00000000,  // ..............
+     0x00000030,  // ........**....
+     0x00000060,  // .......**.....
+     0x000000C0,  // ......**......
+     0x00000000,  // ..............
+     0x00001FFE,  // .************.
+     0x00001FFE,  // .************.
+     0x0000000E,  // ..........***.
+     0x0000000C,  // ..........**..
+     0x0000001C,  // .........***..
+     0x00000038,  // ........***...
+     0x00000070,  // .......***....
+     0x000000E0,  // ......***.....
+     0x000000C0,  // ......**......
+     0x000001C0,  // .....***......
+     0x00000380,  // ....***.......
+     0x00000700,  // ...***........
+     0x00000600,  // ...**.........
+     0x00000E00,  // ..***.........
+     0x00001C00,  // .***..........
+     0x00001FFE,  // .************.
+     0x00001FFE,  // .************.
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
   },
   {             // 173
      8, 27,
@@ -4302,34 +4302,34 @@ 
      0x00000000,  // ..............
   },
   {             // 175
-     8, 27,
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x0000007E,  // .******.
-     0x0000007E,  // .******.
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
+     14, 27,
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x000000C0,  // ......**......
+     0x000000C0,  // ......**......
+     0x00000000,  // ..............
+     0x00001FFE,  // .************.
+     0x00001FFE,  // .************.
+     0x0000000E,  // ..........***.
+     0x0000000C,  // ..........**..
+     0x0000001C,  // .........***..
+     0x00000038,  // ........***...
+     0x00000070,  // .......***....
+     0x000000E0,  // ......***.....
+     0x000000C0,  // ......**......
+     0x000001C0,  // .....***......
+     0x00000380,  // ....***.......
+     0x00000700,  // ...***........
+     0x00000600,  // ...**.........
+     0x00000E00,  // ..***.........
+     0x00001C00,  // .***..........
+     0x00001FFE,  // .************.
+     0x00001FFE,  // .************.
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
+     0x00000000,  // ..............
   },
   {             // 176
      14, 27,
@@ -4371,23 +4371,23 @@ 
      0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000FFE,  // .***********.
-     0x00000FFE,  // .***********.
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000060,  // ......**.....
-     0x00000000,  // .............
-     0x00000FFE,  // .***********.
-     0x00000FFE,  // .***********.
-     0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
+     0x000001F0,  // ....*****....
+     0x000007FC,  // ..*********..
+     0x0000060C,  // ..**.....**..
+     0x0000040C,  // ..*......**..
+     0x0000000C,  // .........**..
+     0x000001FC,  // ....*******..
+     0x000007CC,  // ..*****..**..
+     0x00000E0C,  // .***.....**..
+     0x00000C0C,  // .**......**..
+     0x00000C1C,  // .**.....***..
+     0x00000FFE,  // .***********.
+     0x000003EE,  // ...*****.***.
+     0x0000000E,  // .........***.
+     0x0000000E,  // .........***.
+     0x00000006,  // ..........**.
      0x00000000,  // .............
      0x00000000,  // .............
   },
@@ -4428,23 +4428,23 @@ 
      0x00000000,  // ........
      0x00000000,  // ........
      0x00000000,  // ........
-     0x00000000,  // ........
-     0x0000003C,  // ..****..
-     0x0000007E,  // .******.
-     0x00000046,  // .*...**.
-     0x00000006,  // .....**.
-     0x0000001C,  // ...***..
-     0x00000006,  // .....**.
-     0x00000003,  // ......**
-     0x000000C3,  // **....**
-     0x0000007E,  // .******.
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x0000001E,  // ...****.
      0x0000003C,  // ..****..
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
-     0x00000000,  // ........
+     0x00000070,  // .***....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
+     0x00000030,  // ..**....
      0x00000000,  // ........
      0x00000000,  // ........
      0x00000000,  // ........
@@ -4518,27 +4518,27 @@ 
      0x00000000,  // ............
      0x00000000,  // ............
      0x00000000,  // ............
-     0x000000FF,  // ....********
-     0x000001FF,  // ...*********
-     0x000003F6,  // ..******.**.
-     0x000003F6,  // ..******.**.
-     0x000007F6,  // .*******.**.
-     0x000007F6,  // .*******.**.
-     0x000007F6,  // .*******.**.
-     0x000007F6,  // .*******.**.
-     0x000003F6,  // ..******.**.
-     0x000003F6,  // ..******.**.
-     0x000000F6,  // ....****.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
-     0x00000036,  // ......**.**.
+     0x00000030,  // ......**....
+     0x00000060,  // .....**.....
+     0x000000C0,  // ....**......
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x000001F8,  // ...******...
+     0x000003FC,  // ..********..
+     0x0000060C,  // .**.....**..
+     0x00000600,  // .**.........
+     0x00000700,  // .***........
+     0x000003F0,  // ..******....
+     0x000000FC,  // ....******..
+     0x0000000E,  // ........***.
+     0x00000606,  // .**......**.
+     0x00000606,  // .**......**.
+     0x000007FC,  // .*********..
+     0x000001F8,  // ...******...
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
      0x00000000,  // ............
   },
   {             // 183
@@ -4692,34 +4692,34 @@ 
      0x00000000,  // .......
   },
   {             // 188
-     20, 27,
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00018030,  // ...**.........**....
-     0x00038020,  // ..***.........*.....
-     0x00078040,  // .****........*......
-     0x000180C0,  // ...**.......**......
-     0x00018180,  // ...**......**.......
-     0x00018100,  // ...**......*........
-     0x0001830C,  // ...**.....**....**..
-     0x0001860C,  // ...**....**.....**..
-     0x0001861C,  // ...**....**....***..
-     0x00000C3C,  // ........**....****..
-     0x0000186C,  // .......**....**.**..
-     0x0000384C,  // ......***....*..**..
-     0x000030FF,  // ......**....********
-     0x000060FF,  // .....**.....********
-     0x0000E00C,  // ....***.........**..
-     0x0000C004,  // ....**...........*..
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
-     0x00000000,  // ....................
+     12, 27,
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000030,  // ......**....
+     0x00000060,  // .....**.....
+     0x000000C0,  // ....**......
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x000007FC,  // .*********..
+     0x000007FC,  // .*********..
+     0x00000018,  // .......**...
+     0x00000018,  // .......**...
+     0x00000030,  // ......**....
+     0x00000060,  // .....**.....
+     0x000000C0,  // ....**......
+     0x00000180,  // ...**.......
+     0x00000300,  // ..**........
+     0x00000600,  // .**.........
+     0x000007FE,  // .**********.
+     0x000007FE,  // .**********.
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
   },
   {             // 189
      20, 27,
@@ -4782,34 +4782,34 @@ 
      0x00000000,  // ............
   },
   {             // 191
-     14, 27,
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x000000C0,  // ......**......
-     0x000000C0,  // ......**......
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x00000000,  // ..............
-     0x000000C0,  // ......**......
-     0x000000C0,  // ......**......
-     0x000001C0,  // .....***......
-     0x00000380,  // ....***.......
-     0x00000700,  // ...***........
-     0x00000600,  // ...**.........
-     0x00000C00,  // ..**..........
-     0x00000C0C,  // ..**......**..
-     0x00000C0C,  // ..**......**..
-     0x00000E1C,  // ..***....***..
-     0x000007F8,  // ...********...
-     0x000003E0,  // ....*****.....
+     12, 27,
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000060,  // .....**.....
+     0x00000060,  // .....**.....
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x000007FC,  // .*********..
+     0x000007FC,  // .*********..
+     0x00000018,  // .......**...
+     0x00000018,  // .......**...
+     0x00000030,  // ......**....
+     0x00000060,  // .....**.....
+     0x000000C0,  // ....**......
+     0x00000180,  // ...**.......
+     0x00000300,  // ..**........
+     0x00000600,  // .**.........
+     0x000007FE,  // .**********.
+     0x000007FE,  // .**********.
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
+     0x00000000,  // ............
   },
   {             // 192
      15, 27,
@@ -5113,10 +5113,10 @@ 
   },
   {             // 202
      15, 27,
-     0x000000C0,  // .......**......
-     0x000001E0,  // ......****.....
-     0x00000320,  // .....**..*.....
-     0x00000230,  // .....*...**....
+     0x00000000,  // ...............
+     0x00000000,  // ...............
+     0x00000000,  // ...............
+     0x00000000,  // ...............
      0x00000000,  // ...............
      0x00001FFE,  // ..************.
      0x00001FFE,  // ..************.
@@ -5135,9 +5135,9 @@ 
      0x00001800,  // ..**...........
      0x00001FFE,  // ..************.
      0x00001FFE,  // ..************.
-     0x00000000,  // ...............
-     0x00000000,  // ...............
-     0x00000000,  // ...............
+     0x00000006,  // ............**.
+     0x00000006,  // ............**.
+     0x00000006,  // ............**.
      0x00000000,  // ...............
      0x00000000,  // ...............
   },
@@ -5323,10 +5323,10 @@ 
   },
   {             // 209
      17, 27,
-     0x00000000,  // .................
-     0x00000760,  // ......***.**.....
-     0x00000FE0,  // .....*******.....
+     0x00000070,  // ..........***....
+     0x00000060,  // ..........**.....
      0x000000C0,  // .........**......
+     0x00000180,  // ........**.......
      0x00000000,  // .................
      0x0000600C,  // ..**.........**..
      0x0000700C,  // ..***........**..
@@ -6078,9 +6078,9 @@ 
      0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
-     0x000000E0,  // .....***.....
-     0x000000B0,  // .....*.**....
-     0x00000190,  // ....**..*....
+     0x00000000,  // .............
+     0x00000000,  // .............
+     0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
      0x000001F0,  // ....*****....
@@ -6095,9 +6095,9 @@ 
      0x0000060C,  // ..**.....**..
      0x000007F8,  // ..********...
      0x000001F0,  // ....*****....
-     0x00000000,  // .............
-     0x00000000,  // .............
-     0x00000000,  // .............
+     0x00000038,  // .......***...
+     0x00000070,  // ......***....
+     0x00000038,  // .......***...
      0x00000000,  // .............
      0x00000000,  // .............
   },
@@ -6288,9 +6288,9 @@ 
      0x00000000,  // .............
      0x00000000,  // .............
      0x00000000,  // .............
-     0x00000180,  // ....**.......
-     0x000003F8,  // ...*******...
-     0x00000270,  // ...*..***....
+     0x0000000C,  // .........**..
+     0x00000018,  // ........**...
+     0x00000030,  // .......**....
      0x00000000,  // .............
      0x00000000,  // .............
      0x000004F8,  // ..*..*****...


--- i18n.c.org	Sun Oct 30 14:37:57 2005
+++ i18n.c	Thu Nov 24 13:43:11 2005
@@ -112,7 +112,7 @@ 
     "iso8859-1",
     "iso8859-1",
     "iso8859-15",
-    "iso8859-1",
+    "iso8859-2",
     "iso8859-1",
     "iso8859-7",
     "iso8859-1",


--- eit.c.org	2005-11-04 15:19:16.000000000 +0100
+++ eit.c	2005-11-24 20:03:51.000000000 +0100
@@ -212,6 +212,7 @@ 
             char buffer[256];
             pEvent->SetTitle(ShortEventDescriptor->name.getText(buffer, sizeof(buffer)));
             pEvent->SetShortText(ShortEventDescriptor->text.getText(buffer, sizeof(buffer)));
+	    pEvent->SetLanguageCode(ShortEventDescriptor->languageCode);
             }
          if (ExtendedEventDescriptors) {
             char buffer[ExtendedEventDescriptors->getMaximumTextLength(": ") + 1];


--- epg.c.org	2005-11-06 11:31:58.000000000 +0100
+++ epg.c	2005-11-24 20:03:51.000000000 +0100
@@ -96,6 +96,7 @@ 
   duration = 0;
   vps = 0;
   SetSeen();
+  SetLanguageCode(NULL);
 }
 
 cEvent::~cEvent()
@@ -329,6 +330,17 @@ 
   return false;
 }
 
+void cEvent::SetLanguageCode(char *code)
+{
+    if (code == NULL)
+       languageCode[0] = 0;
+    else {
+       strncpy(languageCode,code,3);
+       languageCode[3] = 0;
+    }
+}
+
+
 #define MAXEPGBUGFIXSTATS 13
 #define MAXEPGBUGFIXCHANS 100
 struct tEpgBugFixStats {
@@ -404,20 +416,132 @@ 
      }
 }
 
+char *FixPl(char *par,bool pl)
+{
+   if (par != NULL) {
+      char *ret = strdup(par);
+      int i,j=0;
+      
+      if ( pl = true ) {
+	for(i=0;i<strlen(par);i++)
+	{
+		switch (par[i]) {
+		case 'Î':
+		switch (par[i+1]) {
+			case 'a':
+			ret[j++] = '±';
+			i++;
+			break;
+			case 'e':
+			ret[j++] = 'ê';
+			i++;
+			break;
+			default:
+			ret[j++]=par[i];
+		}
+		break;
+		case 'Â':
+		switch (par[i+1]) {
+			case 'c':
+			ret[j++] = 'æ';
+			i++;
+			break;
+			case 'C':
+			ret[j++] = 'Æ';
+			i++;
+			break;
+			case 's':
+			ret[j++] = '¶';
+			i++;
+			break;
+			case 'S':
+			ret[j++] = '¦';
+			i++;
+			break;
+			case 'o':
+			ret[j++] = 'ó';
+			i++;
+			break;
+			case 'n':
+			ret[j++] = 'ñ';
+			i++;
+			break;
+			case 'z':
+			ret[j++] = '¼';
+			i++;
+			break;
+			case 'Z':
+			ret[j++] = '¬';
+			i++;
+			break;
+			default:
+			ret[j++]=par[i];
+		}
+		break;
+		case 'Ç':
+		switch (par[i+1]) {
+			case 'z':
+			ret[j++] = '¿';
+			i++;
+			break;
+			case 'Z':
+			ret[j++] = '¯';
+			i++;
+			break;
+			default:
+			ret[j++]=par[i];
+		}
+		break;
+		case 'ø':
+			ret[j++]='³';
+			break;
+		case 'è':
+			ret[j++]='£';
+			break;
+		case '\n':
+		case '\x86':
+		case '\x87':
+			ret[j++]=' ';
+			break;
+		default:
+			ret[j++]=par[i];
+		}
+	}
+      }	
+      else {
+	for(i=0;i<strlen(par);i++)
+	{
+		switch (par[i]) {
+		case '\n':
+		case '\x86':
+		case '\x87':
+			ret[j++]=' ';
+			break;
+		default:
+			ret[j++]=par[i];		
+		}	
+	}      
+      }
+      if (j<strlen(par))
+         ret[j] = 0;
+      free(par);
+      return ret;
+   }
+   else
+     return par;
+}
+
 void cEvent::FixEpgBugs(void)
 {
   // VDR can't usefully handle newline characters in the title and shortText of EPG
   // data, so let's always convert them to blanks (independent of the setting of EPGBugfixLevel):
-  strreplace(title, '\n', ' ');
-  strreplace(shortText, '\n', ' ');
-  // Same for control characters:
-  strreplace(title, '\x86', ' ');
-  strreplace(title, '\x87', ' ');
-  strreplace(shortText, '\x86', ' ');
-  strreplace(shortText, '\x87', ' ');
-  strreplace(description, '\x86', ' ');
-  strreplace(description, '\x87', ' ');
-
+  bool plfix = false;
+  if (!strcmp(languageCode,"pol")) 
+     plfix = true;
+  title = FixPl(title,plfix);
+  shortText = FixPl(shortText,plfix);
+  description = FixPl(description, plfix);
+    
   if (Setup.EPGBugfixLevel == 0)
      return;
 

--- epg.h.org	2005-09-11 14:54:30.000000000 +0200
+++ epg.h	2005-11-24 20:03:51.000000000 +0100
@@ -52,6 +52,7 @@ 
   cSchedule *schedule;     // The Schedule this event belongs to
   u_int16_t eventID;       // Event ID of this event
   uchar tableID;           // Table ID this event came from
+  char languageCode[4];  // Language code for correct display text in EPG - Fix Cyfra+  
   uchar version;           // Version number of section this event came from
   int runningStatus;       // 0=undefined, 1=not running, 2=starts in a few seconds, 3=pausing, 4=running
   char *title;             // Title of this event
@@ -102,6 +103,7 @@ 
   void Dump(FILE *f, const char *Prefix = "", bool InfoOnly = false) const;
   bool Parse(char *s);
   static bool Read(FILE *f, cSchedule *Schedule);
+  void SetLanguageCode(char *code);  
   void FixEpgBugs(void);
   };