[Matroska-general] Clarification on S_TEXT/UTF8

Moritz Bunkus moritz at bunkus.org
Sat Dec 8 20:07:42 CET 2012


On Sat, Dec 8, 2012 at 4:02 PM, Steve Lhomme <slhomme at matroska.org> wrote:

>> 1. Are line breaks supposed to be coded as LF or CRLF? mkvmerge seems to
>>    convert single LF to CRLF, is it normative?

Shouldn't matter, but mkvmerge does indeed convert LF (\n) to CRLF
(\r\n) -- most likely because there were subtitle renderers that
failed to display line breaks without carriage returns properly (you
know, a lot of Windows-only software has this kind of bugs). But there
are no specs about this. CRLF is more compatible, so you should
probably opt to use that as well.

>> 2. Should the line break at the end of the last line be part of the packet?
>>    Again, mkvmerge sheds some light: it trims the final line break.

Well... there are no specs for this, so if you don't remove the last
because you're trying to force the subtitle renderer to position the
subtitles differently and do that, but don't expect that result to be
universal across all subtitle renderers out there. They pretty much
all do what they won't with respect to positioning.

Kind regards,

More information about the Matroska-general mailing list