Amp is displayed as & in EPG (1 Viewer)

grubi

Portal Pro
June 16, 2007
1,216
80
127.0.0.1
Home Country
Germany Germany
The title says it all.
The symbol & in EPG data and recordings is displayed as &
So Lenßen&Partner looks like Lenßen&Partner

grubi.
 

Marcusb

Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    yep, it's been posted a few times.
    Strange, as I think it affects everyone, but there is not much comment on this issue.

    The & is just the HTML code for the & sign, just like > is > (unicode).
    This is how they are stored in the EPG XML file, but MP should be translating them back.
    I guerss maybe it doesn't effect people who use the DTV grab, just the webepg grab.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Yes possibly only users of WebEPG are affected (wich I use also) as & is the HTML entity for &.
    So maybe has to be fixed inside the WebEPG plugin.

    grubi.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Just took a quick look at the sources.
    All the conversion is done by calling the method "ConvertHTMLToAnsi" so the problem is not inside the plugin itself. I think to track this further down it is necessary to debug that part to see what exactly happens. As there are so many HTML entities there is the chance that processing & is simply missing.

    grubi.
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    the whole amp thing annoys me in HTML. The purpose of these characters is to enable the display of characters that a probram can't natively support (I know I worded this badly) but the & is actually in the code so why have a substitue for something that is needed for the substitute?

    Thanks for taking the time to check it out Grubi :)
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    the whole amp thing annoys me in HTML. The purpose of these characters is to enable the display of characters that a probram can't natively support (I know I worded this badly) but the & is actually in the code so why have a substitue for something that is needed for the substitute?

    Thanks for taking the time to check it out Grubi :)

    The & character is the escape character for all html entities (every entity begins with it) so
    to distinguish it, it also has to be an entity itself.

    grubi.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    I had a more detailed look at the sources and found the problem.

    The method "ConvertHTMLToAnsi" is no longer called at all. The lines in question have been commented out, and this is the reason why & is not substituted. I don't know why the developer did this. Maybe previously the tvguide.xml file contained HTML entities and this has changed.

    However the current code uses the "XmlReader.ReadInnerXml" method which does not convert entities and is only useful if called on nodes containing subnodes. Changing this call to "XmlReader.ReadString" instead would solve the problem.

    Maybe a dev could change the following lines and substitute "ReadInnerXml" by "ReadString"

    case "title": if (nodeTitle == null) nodeTitle = xmlProg.ReadInnerXml(); else xmlProg.Skip(); break;
    case "category": if (nodeCategory == null) nodeCategory = xmlProg.ReadInnerXml(); else xmlProg.Skip(); break;
    case "desc": if (nodeDescription == null) nodeDescription = xmlProg.ReadInnerXml(); else xmlProg.Skip(); break;
    case "sub-title": if (nodeEpisode == null) nodeEpisode = xmlProg.ReadInnerXml(); else xmlProg.Skip(); break;
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Marcusb

    OK. I made the changes in question and tested it. Works as it should.
    I have a rebuild of the plugin based on SVN 15673 attached for testing.
    Would be nice if you post back your results.

    If any dev could incorporate this into the official release it would be nice.
    Source is also included in the zip archive.

    grubi.
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    sorry grubi, I'm in Mexico at the moment and about to head off to Peru to hike through the Amazon. I won't be back home to Melbourne until early October.

    I really appreciate you looking into it, but I can't help for a while, sorry. Surely this is effecting others too?
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    sorry grubi, I'm in Mexico at the moment and about to head off to Peru to hike through the Amazon. I won't be back home to Melbourne until early October.

    I really appreciate you looking into it, but I can't help for a while, sorry. Surely this is effecting others too?

    No problem.
    Everyone is affected as XML entities are not converted to the representing chars. The question is how often you will have those characters like &<> in EPG data. In Germany you will find them quite often.

    I will ask a dev if he could incorporate my changes. Should not take longer than 5 minutes.

    grubi.
     

    Users who are viewing this thread

    Similar threads

    done: Loading...
    done: Loading...
    Hi. I have a problem with a WebEPG grabber I'm trying to do. The problem is that the site returns a json-file and I cant get my...
    Replies
    25
    Views
    4K
    I'm using MP1 Ukraine ( as a side issue Trend antivirus says later versions are ransomwear ) and I've used MP for many years. Have I missed something all this time? Is there a way of marking recordings as favourites, and an easy way to display them? Thank you
    I'm using MP1 Ukraine ( as a side issue Trend antivirus says later versions are ransomwear ) and I've used MP for many years. Have...
    I'm using MP1 Ukraine ( as a side issue Trend antivirus says later versions are ransomwear ) and I've used MP for many years. Have...
    Replies
    0
    Views
    475
    And this is the follow-up thread, which includes log files: PiP audio problem
    And this is the follow-up thread, which includes log files: PiP audio problem
    I just updated from 2.4. Update did not conserve my channels or epg plug-in or anything, looks like, which of course was a...
    Replies
    5
    Views
    636
    I have looked at your log files, but as usual they are unintelligible gobbledegook. (I am sure that the original developers who wrote that code know what the log entries mean, but those developers have long since retired from the MP team.) I regret to say that I think that you will have to use the "brute force" method to track down...
    I have looked at your log files, but as usual they are unintelligible gobbledegook. (I am sure that the original developers who...
    Sometimes when displaying the OSD whilst playing a recorded TV show the video freezes and the sound continues for about 30 seconds...
    Replies
    1
    Views
    659
    @CyberSimian As I have just posted in the MP2 subforum I will stay with MP1 for the time being. Many thanks for all your very informative and detailed responses. I will take your advice and monitor the Scheduled recordings list for the discrepancies you have described. Cheers.
    @CyberSimian As I have just posted in the MP2 subforum I will stay with MP1 for the time being. Many thanks for all your very...
    I am in Australia. My problem is with recorded tv programs. Most times the program title and info are correct but quite often the...
    Replies
    36
    Views
    3K
    Top Bottom