<div dir="ltr">On Sat, Sep 14, 2013 at 7:22 AM, Joey Morris <span dir="ltr"><<a href="mailto:rjmorris.list@zoho.com" target="_blank">rjmorris.list@zoho.com</a>></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 <<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>> wrote on Sat, Sep 14, 2013 at 06:08:48AM -0700:<br>
<div><div class="h5">> On Fri, Sep 13, 2013 at 6:40 PM, Joey Morris <<a href="mailto:rjmorris.list@zoho.com">rjmorris.list@zoho.com</a>> wrote:<br>
><br>
> > Thanks Jim. What did you use to see the rectangle outline with a<br>
> > question mark in it? MythTV is the only place I've seen my rectangle.<br>
> > I've looked at the log file in emacs, vi, and in the console, but each<br>
> > of those seem to have performed the backspace operation instead of<br>
> > displaying a symbol representing the backspace. I also tried creating<br>
> > a hex dump using xxd, but that doesn't show the backspace either.<br>
> ><br>
><br>
> This rectangle/question character was seen only in the mythfrontend OSD<br>
> captions. To experiment, I took an existing recording/video with a .srt<br>
> file (in my case, an HD-PVR recording with a .srt file created using<br>
> <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>
> emacs, and manually added weird characters like \r, ^H, ^?, etc. to the<br>
> ends of lines. Whitespace characters like \r were stripped as expected,<br>
> but other special characters became the question-mark-inside-rectangle<br>
> symbol. This is with the FreeMono font. Notably, the ^H backspace<br>
> 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("last=%1 ").arg(text[text.length()-1].unicode());<br>
<br>
and it displayed "last=0" 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(" text='%1'").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'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'll have a look.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Jim</div></div>