From b41c2886775b1e25d94aa270743be8ade5126053 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 18 Jun 2007 01:50:49 +0000 Subject: [PATCH] Fixed handling of single quotes/lines in TTXT, but still at a loss on how to decode the line properly (a sample that actually has an apostrophe would be useful) Originally committed to SVN as r1244. --- aegisub/subtitle_format_ttxt.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aegisub/subtitle_format_ttxt.cpp b/aegisub/subtitle_format_ttxt.cpp index f7343b6d1..3826b4dd7 100644 --- a/aegisub/subtitle_format_ttxt.cpp +++ b/aegisub/subtitle_format_ttxt.cpp @@ -114,10 +114,25 @@ void TTXTSubtitleFormat::ReadFile(wxString filename,wxString forceEncoding) { // Create line if (!text.IsEmpty()) { + // Process text + wxString finalText; + finalText.Alloc(text.Length()); + bool in = false; + bool first = true; + for (size_t i=0;iStart = time; diag->End.SetMS(time.GetMS()+5000); - diag->Text = text; + diag->Text = finalText; diag->group = _T("[Events]"); diag->Style = _T("Default"); diag->Comment = false;