diff --git a/src/Forms/VobSubOcr.cs b/src/Forms/VobSubOcr.cs index 6b0bdf881..7eecc7d57 100644 --- a/src/Forms/VobSubOcr.cs +++ b/src/Forms/VobSubOcr.cs @@ -4913,7 +4913,15 @@ namespace Nikse.SubtitleEdit.Forms if (checkBoxTesseractMusicOn.Checked) { - if ((line.StartsWith("J' ") || line.StartsWith("J“ ") || line.StartsWith("J* ") || line.StartsWith("♪ ")) && unItalicText.Length > 3 && unItalicText.Substring(1, 2) == "' ") + if ((line.StartsWith("J' ") || line.StartsWith("J“ ") || line.StartsWith("J* ") || line.StartsWith("♪ ")) && unItalicText.Length > 3 && unItalicText.Replace("", string.Empty).Replace("", string.Empty).Substring(1, 2) == "' ") + { + unItalicText = "♪ " + unItalicText.Remove(0, 2).TrimStart(); + } + if ((line.StartsWith("J' ") || line.StartsWith("J“ ") || line.StartsWith("J* ") || line.StartsWith("♪ ")) && unItalicText.Length > 3 && unItalicText.Replace("", string.Empty).Replace("", string.Empty).Substring(1, 1) == " ") + { + unItalicText = "♪ " + unItalicText.Remove(0, 2).TrimStart(); + } + if ((line.StartsWith("J' ") || line.StartsWith("J“ ") || line.StartsWith("J* ") || line.StartsWith("♪ ")) && unItalicText.Length > 3 && unItalicText.Replace("", string.Empty).Replace("", string.Empty).Substring(2, 1) == " ") { unItalicText = "♪ " + unItalicText.Remove(0, 2).TrimStart(); }