<div dir="ltr">On Sat, Sep 14, 2013 at 7:22 AM, Joey Morris <span dir="ltr">&lt;<a href="mailto:rjmorris.list@zoho.com" target="_blank">rjmorris.list@zoho.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jim Stichnoth &lt;<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>&gt; wrote on Sat, Sep 14, 2013 at 06:08:48AM -0700:<br>

<div><div class="h5">&gt; On Fri, Sep 13, 2013 at 6:40 PM, Joey Morris &lt;<a href="mailto:rjmorris.list@zoho.com">rjmorris.list@zoho.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Thanks Jim. What did you use to see the rectangle outline with a<br>
&gt; &gt; question mark in it? MythTV is the only place I&#39;ve seen my rectangle.<br>
&gt; &gt; I&#39;ve looked at the log file in emacs, vi, and in the console, but each<br>
&gt; &gt; of those seem to have performed the backspace operation instead of<br>
&gt; &gt; displaying a symbol representing the backspace. I also tried creating<br>
&gt; &gt; a hex dump using xxd, but that doesn&#39;t show the backspace either.<br>
&gt; &gt;<br>
&gt;<br>
&gt; This rectangle/question character was seen only in the mythfrontend OSD<br>
&gt; captions.  To experiment, I took an existing recording/video with a .srt<br>
&gt; file (in my case, an HD-PVR recording with a .srt file created using<br>
&gt; <a href="http://www.mythtv.org/wiki/Captions_with_HD-PVR" target="_blank">http://www.mythtv.org/wiki/Captions_with_HD-PVR</a>), edited the .srt file in<br>
&gt; emacs, and manually added weird characters like \r, ^H, ^?, etc. to the<br>
&gt; ends of lines.  Whitespace characters like \r were stripped as expected,<br>
&gt; but other special characters became the question-mark-inside-rectangle<br>
&gt; symbol.  This is with the FreeMono font.  Notably, the ^H backspace<br>
&gt; character did seem to erase characters in the log output.<br>
<br>
</div></div>After a little experimentation in FormattedTextChunk::ToLogString in<br>
subtitlescreen.cpp, I believe the weird character in my case is a null<br>
character, not backspace. I added this to the log string:<br>
<br>
    str += QString(&quot;last=%1 &quot;).arg(text[text.length()-1].unicode());<br>
<br>
and it displayed &quot;last=0&quot; in the log. Then I did this to the log<br>
string:<br>
<br>
    QString tmp = text;<br>
    tmp.remove(QChar(0));<br>
    str += QString(&quot; text=&#39;%1&#39;&quot;).arg(tmp);<br>
<br>
and the log displayed the string as one would expect, that is, the<br>
closing single quote was present.<br>
<br>
Before I approach the Handbrake devs with this, can you think of any<br>
reason MythTV would be introducing a null character? Or how I can<br>
inspect the video file to find out if the nulls are in there?<br>
<div class="HOEnZb"><div class="h5"></div></div></blockquote></div><br></div><div class="gmail_extra">Interesting.  (BTW, I wanted to try inserting a null character, but I was too lazy to figure out how to do it in emacs. :) )</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The code that extracts the SRT text from external files is separate from the code that gets it when it&#39;s embedded in the video.  It could be a problem with the latter, as I only have the former to test with.  Would it be possible to create a test file with this behavior?  Just one errant subtitle will do.  Create a new ticket and I&#39;ll have a look.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Jim</div></div>