Dear experts,

I am currently trying to convert a string to ISO-8859-1 using the
following code fragment:

  cCharSetConv conv(NULL, "ISO-8859-1");
  const char *s_converted = conv.Convert(string);

Running VDR with UTF-8, this conversion failes (i.e., s_converted == string).
This is due to the fact, that cCharSetConv::SystemCharacterTable contains "NULL"
instead of "UTF-8". This is because systemCharacterTable is never set:

void cCharSetConv::SetSystemCharacterTable(const char *CharacterTable)
  systemCharacterTable = NULL;
  if (!strcasestr(CharacterTable, "UTF-8")) {
     systemCharacterTable = strdup(CharacterTable);

Is there a reason for this?

The conversion works fine, if I use  "UTF-8" instead of "NULL":
  cCharSetConv conv("UTF-8", "ISO-8859-1");

Best Regards,

vdr mailing list

Reply via email to