home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
bug fix for non-default encoding in webEPG sublink
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Vasek" data-source="post: 338113" data-attributes="member: 27707"><p>Hi,</p><p>it seems not many people need it, but there is small bug in WebEPG Sublink grabber using non-default encoding. I.e. my grabber (see attachement) uses at the time utf-8. Independent on settings in the grabber, for sublink parser default (iso-8859-1, see HTMLPage.cs) encoding is always used. The bug is in HTTPRequest.cs file, functino:</p><p></p><p>public HTTPRequest Add(string relativeUri)</p><p></p><p>The problem is, that in Add new HTTPRequest is always created and set based on relativeUri, but there is no information about encoding in relativeUri, so default is used and settings from grabber is lost. There is simple solution: setting of encoding of new object according to the old settings. I did the fix, which works, here is my version of Add function:</p><p></p><p>public HTTPRequest Add(string relativeUri)</p><p>{</p><p>if (relativeUri.StartsWith("?"))</p><p>relativeUri = Uri.LocalPath + relativeUri;</p><p>Uri newUri = new Uri(Uri, relativeUri);</p><p>HTTPRequest newHTTPRequest = new HTTPRequest(newUri);</p><p>newHTTPRequest._encoding = this._encoding;</p><p>return newHTTPRequest;</p><p>}</p><p></p><p>The old (buggy) version is:</p><p></p><p>public HTTPRequest Add(string relativeUri)</p><p>{</p><p>if (relativeUri.StartsWith("?"))</p><p>relativeUri = Uri.LocalPath + relativeUri;</p><p>Uri newUri = new Uri(Uri, relativeUri);</p><p>return new HTTPRequest(newUri);</p><p>}</p><p></p><p>I ask some developer make a fix in official (SVN) version.</p><p></p><p>I have already post it some time ago, but probably not in right forum (<a href="https://forum.team-mediaportal.com/webepg-136/bug-fix-error-non-default-sublink-encoding-47867/" target="_blank">https://forum.team-mediaportal.com/webepg-136/bug-fix-error-non-default-sublink-encoding-47867/</a>). Sorry for that, it is my first patch.</p><p></p><p>Vasek</p></blockquote><p></p>
[QUOTE="Vasek, post: 338113, member: 27707"] Hi, it seems not many people need it, but there is small bug in WebEPG Sublink grabber using non-default encoding. I.e. my grabber (see attachement) uses at the time utf-8. Independent on settings in the grabber, for sublink parser default (iso-8859-1, see HTMLPage.cs) encoding is always used. The bug is in HTTPRequest.cs file, functino: public HTTPRequest Add(string relativeUri) The problem is, that in Add new HTTPRequest is always created and set based on relativeUri, but there is no information about encoding in relativeUri, so default is used and settings from grabber is lost. There is simple solution: setting of encoding of new object according to the old settings. I did the fix, which works, here is my version of Add function: public HTTPRequest Add(string relativeUri) { if (relativeUri.StartsWith("?")) relativeUri = Uri.LocalPath + relativeUri; Uri newUri = new Uri(Uri, relativeUri); HTTPRequest newHTTPRequest = new HTTPRequest(newUri); newHTTPRequest._encoding = this._encoding; return newHTTPRequest; } The old (buggy) version is: public HTTPRequest Add(string relativeUri) { if (relativeUri.StartsWith("?")) relativeUri = Uri.LocalPath + relativeUri; Uri newUri = new Uri(Uri, relativeUri); return new HTTPRequest(newUri); } I ask some developer make a fix in official (SVN) version. I have already post it some time ago, but probably not in right forum ([URL="https://forum.team-mediaportal.com/webepg-136/bug-fix-error-non-default-sublink-encoding-47867/"]https://forum.team-mediaportal.com/webepg-136/bug-fix-error-non-default-sublink-encoding-47867/[/URL]). Sorry for that, it is my first patch. Vasek [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
bug fix for non-default encoding in webEPG sublink
Contact us
RSS
Top
Bottom