[Approved] Teletext fix for wrong character encoding. (1 Viewer)

jblomb

Retired Team Member
  • Premium Supporter
  • May 17, 2007
    96
    17
    Sundsvall
    Home Country
    Sweden Sweden
    On TCM Nordic swedish subtitle is on page 777, followed by dutch on page 785. The encoding for swedish subtitle is 2 (Swedish/Finnish/Hungarian) and for dutch it's 4 (French).

    Looking at the code:
    Code:
          int new_page_num = header.PageNumber();
            language = header.Language();
    
          if (pageNumInProgress != new_page_num)
          {
            //LogDebug("Mag %i, Page %i finished by new page %i", magID, pageNumInProgress, new_page_num);
            if (pageNumInProgress != -1)
            {
              // if we were working on a previous page its finished now
              EndPage();
            }
            Clear();
            pageNumInProgress = new_page_num;
          }
    ..you can see that the language is set before finishing up the old page, and because of that effectively sets the encoding to french before processing page 777 (swedish).

    The patch just moves language = header.Language(); after Clear(); so the current page will finish before setting the encoding of the new page.

    :D:D:D
     

    Attachments

    • TCM Teletext.diff
      30.6 KB

    Users who are viewing this thread

    Top Bottom