Re: CAM menu umlauts broken?

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

 



On 05/21/08 23:58, Hanno Zulla wrote:
> Hi,
> 
>>>> on my e-tobi based 1.6 setup, the CAM menu umlauts are broken, while all
>>>> the other menu items (that I checked so far) use the correct encoding.
>>>>
>>>> Is there a recoding missing between the CAM and the vdr OSD?
>>> What LANG environment are u using? Please look at your /etc/defaults/vdr 
>>> file.
>> VDR_LANG="de_DE.UTF-8"
>> VDR_CHARSET_OVERRIDE="ISO-8859-1"
>>
>>> On my e-tobi based install, my cam don't have problems with de_DE.UTF-8
>> My setup (running on Ubuntu) shows broken Umlauts in the cam menu.
> 
> Here's a screenshot of the effect.
> ...

Please try the following (untested) version of this function in ci.c:


static char *CopyString(int Length, const uint8_t *Data)
///< Copies the string at Data.
///< \return Returns a pointer to a newly allocated string.
{
   // Some CAMs send funny characters at the beginning of strings.
   // Let's just skip them:
   while (Length > 0 && (*Data == ' ' || *Data == 0x05 || *Data == 0x96 || *Data == 0x97)) {
         Length--;
         Data++;
         }
   char s[Length + 1];
   strncpy(s, (char *)Data, Length);
   s[Length] = 0;
   // The character 0x8A is used as newline, so let's put a real '\n' in there:
   strreplace(s, 0x8A, '\n');
   cCharSetConv csc("ISO-8859-1");
   return strdup(csc.Convert(s));
}


This should convert the CAM's strings to whatever encoding VDR uses.

Maybe the 0x05 that some CAMs put at the beginning of strings is a
character encoding indicator, just as with the SI strings (see libsi/si.c,
CharacterTables1[]). However, I don't think I've seen that anywhere in the
CI specs of the DVB standard. Maybe somebody can point out where this
might be documented.

Please report whether this fixes the problem for you.

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux