Added: new Unicode whitespace

This commit is contained in:
ivandrofly 2014-06-08 02:44:45 +01:00
parent 023b816707
commit 9e9b41af26

View File

@ -1135,6 +1135,7 @@ namespace Nikse.SubtitleEdit.Forms
{
const string zeroWhiteSpace = "\u200B";
const string zeroWidthNoBreakSpace = "\uFEFF";
const string noBreakSpace = "\u00A0";
string fixAction = _language.UnneededSpace;
int doubleSpaces = 0;
@ -1147,6 +1148,8 @@ namespace Nikse.SubtitleEdit.Forms
p.Text = p.Text.Replace(zeroWhiteSpace, string.Empty);
p.Text = p.Text.Replace(zeroWidthNoBreakSpace, string.Empty);
p.Text = p.Text.Replace(noBreakSpace, string.Empty);
p.Text = p.Text.Replace("", string.Empty); // some kind of hidden space!!!
while (p.Text.Contains(" "))
p.Text = p.Text.Replace(" ", " ");