Premiere UTF-8 fix for VDR 1.5.1+

Message ID 200706281541.54081.taferner@kde.org
State New
Headers

Commit Message

Stefan Taferner June 28, 2007, 1:41 p.m. UTC
  Hi all,

Here is a small patch for all Premiere watchers who want to use UTF-8
encoding.

The patch simply changes the default character set that is used when
no encoding is broadcasted.

Kind regards,
Stefan
  

Comments

Klaus Schmidinger June 28, 2007, 7:42 p.m. UTC | #1
On 06/28/07 15:41, Stefan Taferner wrote:
> Hi all,
> 
> Here is a small patch for all Premiere watchers who want to use UTF-8
> encoding.
> 
> The patch simply changes the default character set that is used when
> no encoding is broadcasted.
> 
> Kind regards,
> Stefan
> 
> 
> ------------------------------------------------------------------------
> 
> --- libsi/si.c.orig	2007-06-28 14:37:28.000000000 +0200
> +++ libsi/si.c	2007-06-28 14:35:45.000000000 +0200
> @@ -340,5 +340,6 @@
>  // and length are adjusted accordingly.
>  static const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL) {
> -   const char *cs = "ISO6937";
> +   //   const char *cs = "ISO6937";
> +   const char *cs = "ISO8859-15";
>     if (isSingleByte)
>        *isSingleByte = false;

Well, this might cause problems on channels that do adhere to the
standard and actually broadcast their EPG data in ISO6937.

Maybe somebody should call Premiere and complain to them. After all,
it's them who are not following the standard ;-)

Klaus
  
Luca Olivetti June 28, 2007, 7:53 p.m. UTC | #2
En/na Klaus Schmidinger ha escrit:

> Well, this might cause problems on channels that do adhere to the
> standard and actually broadcast their EPG data in ISO6937.
> 
> Maybe somebody should call Premiere and complain to them. After all,
> it's them who are not following the standard ;-)

Unfortunately they're not the only one :-(

Bye
  
Klaus Schmidinger June 28, 2007, 8 p.m. UTC | #3
On 06/28/07 21:53, Luca Olivetti wrote:
> En/na Klaus Schmidinger ha escrit:
> 
>> Well, this might cause problems on channels that do adhere to the
>> standard and actually broadcast their EPG data in ISO6937.
>>
>> Maybe somebody should call Premiere and complain to them. After all,
>> it's them who are not following the standard ;-)
> 
> Unfortunately they're not the only one :-(

Maybe some broadcasters aren't even aware that they are not
adhering to the DVB standard. So let's all call them and tell
them about it. The more people call and complain, the better
the chances things get fixed (at least that's what I'd hope for ;-).
Building workarounds into receivers is certainly not the right
way to go (even though it is, of course, a quick fix and may be
sufficient for some users).

Klaus
  
Stefan Taferner June 29, 2007, 8:13 a.m. UTC | #4
On Thursday 28 June 2007 22:00:02 Klaus Schmidinger wrote:
> On 06/28/07 21:53, Luca Olivetti wrote:
[...]
> Maybe some broadcasters aren't even aware that they are not
> adhering to the DVB standard. So let's all call them and tell
> them about it. The more people call and complain, the better
> the chances things get fixed (at least that's what I'd hope for ;-).
> Building workarounds into receivers is certainly not the right
> way to go (even though it is, of course, a quick fix and may be
> sufficient for some users).

My patch is not meant to be a solution, rather a temporary fix until
the problem is solved somehow.

I have some experience with emails. There you have standards too,
but the email clients not always follow the rules. What you have
to do is to work around all these quirks.

Of course calling the broadcaster is the right way, but until they fix it
it would be helpful to have a workaround. There will be broken
broadcasts anyways - I doubt that we can get all broadcasters to
obey the standard.

What I was thinking of is to make the default encoding configurable.
A commandline option comes into mind, or using the default
encoding from the language settings.

The ultimative solution would be to make it configurable per
station, of course. But that would require much more work and adds
complexity, and it is probably not necessary for most of us.

Kind regards,
Stefan
  
Klaus Schmidinger June 29, 2007, 5:07 p.m. UTC | #5
On 06/29/07 10:13, Stefan Taferner wrote:
> On Thursday 28 June 2007 22:00:02 Klaus Schmidinger wrote:
>> On 06/28/07 21:53, Luca Olivetti wrote:
> [...]
>> Maybe some broadcasters aren't even aware that they are not
>> adhering to the DVB standard. So let's all call them and tell
>> them about it. The more people call and complain, the better
>> the chances things get fixed (at least that's what I'd hope for ;-).
>> Building workarounds into receivers is certainly not the right
>> way to go (even though it is, of course, a quick fix and may be
>> sufficient for some users).
> 
> My patch is not meant to be a solution, rather a temporary fix until
> the problem is solved somehow.
> 
> I have some experience with emails. There you have standards too,
> but the email clients not always follow the rules. What you have
> to do is to work around all these quirks.
> 
> Of course calling the broadcaster is the right way, but until they fix it
> it would be helpful to have a workaround. There will be broken
> broadcasts anyways - I doubt that we can get all broadcasters to
> obey the standard.
> 
> What I was thinking of is to make the default encoding configurable.
> A commandline option comes into mind, or using the default
> encoding from the language settings.
> 
> The ultimative solution would be to make it configurable per
> station, of course. But that would require much more work and adds
> complexity, and it is probably not necessary for most of us.

That would be the ultimate *workaround*. The ultimate *solution*
is to make the providers follow the standard.

Let's try pestering the providers until they fix this on their end.

Klaus
  

Patch

--- libsi/si.c.orig	2007-06-28 14:37:28.000000000 +0200
+++ libsi/si.c	2007-06-28 14:35:45.000000000 +0200
@@ -340,5 +340,6 @@ 
 // and length are adjusted accordingly.
 static const char *getCharacterTable(const unsigned char *&buffer, int &length, bool *isSingleByte = NULL) {
-   const char *cs = "ISO6937";
+   //   const char *cs = "ISO6937";
+   const char *cs = "ISO8859-15";
    if (isSingleByte)
       *isSingleByte = false;