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!)
TBS: CI/CAM support and other improvements
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="FreakyJ" data-source="post: 1019582" data-attributes="member: 106003"><p>I had a look on the class, but my thinking was that only the first byte of the whole response has the encoding. Didn't know that every Menu entry has the encoding at the beginning... So I thought I'm adding the bytes to an array and the first letter is treated as encoding, what would be obviously wrong oO</p><p> </p><p> </p><p></p><p>That is basically exact what I already tried, the only difference between your solution and my is:</p><p></p><p>this was my code:</p><p></p><p> </p><p>I had to replace all your .count with .length, because a byte array doesn't support count.</p><p>the current code:</p><p>[CODE]IntPtr p = Marshal.AllocCoTaskMem(entryArray.Length + 1);</p><p> Marshal.Copy(entryArray, 0, p, entryArray.Length);</p><p> Marshal.WriteByte(p, entryArray.Length, 0);</p><p> DVB_MMI.DumpBinary(p, 0, entryArray.Length); // for debug showing the byte values</p><p> entries.Add(DvbTextConverter.Convert(p, null));</p><p> entryCount++;</p><p> entry = string.Empty;</p><p> entryArray = null;</p><p> Marshal.FreeCoTaskMem(p);[/CODE]</p><p>I also added this for the last entry, binaries attached <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p> </p><p>Result:</p><p></p><p>but for me also the old version worked, so @<a href="https://forum.team-mediaportal.com/members/doctor64.100131/" target="_blank">doctor64 please test the attached binaries <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></a></p></blockquote><p></p>
[QUOTE="FreakyJ, post: 1019582, member: 106003"] I had a look on the class, but my thinking was that only the first byte of the whole response has the encoding. Didn't know that every Menu entry has the encoding at the beginning... So I thought I'm adding the bytes to an array and the first letter is treated as encoding, what would be obviously wrong oO That is basically exact what I already tried, the only difference between your solution and my is: this was my code: I had to replace all your .count with .length, because a byte array doesn't support count. the current code: [CODE]IntPtr p = Marshal.AllocCoTaskMem(entryArray.Length + 1); Marshal.Copy(entryArray, 0, p, entryArray.Length); Marshal.WriteByte(p, entryArray.Length, 0); DVB_MMI.DumpBinary(p, 0, entryArray.Length); // for debug showing the byte values entries.Add(DvbTextConverter.Convert(p, null)); entryCount++; entry = string.Empty; entryArray = null; Marshal.FreeCoTaskMem(p);[/CODE] I also added this for the last entry, binaries attached :) Result: but for me also the old version worked, so @[URL='https://forum.team-mediaportal.com/members/doctor64.100131/']doctor64 please test the attached binaries :)[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
TBS: CI/CAM support and other improvements
Contact us
RSS
Top
Bottom