Try to fix Arabic character count - thx OmrSi :)

Work on #7889
This commit is contained in:
Nikolaj Olsson 2024-02-01 20:17:10 +01:00
parent b501ebcb8c
commit 51f95d9489
2 changed files with 38 additions and 8 deletions

View File

@ -34,10 +34,25 @@ namespace Nikse.SubtitleEdit.Core.Common.TextLengthCalculator
{
length++;
}
else
{
length++;
}
}
else if (element != "\u200E" &&
element != "\u200F" &&
element != "\u202A" &&
element != "\u202B" &&
element != "\u202C" &&
element != "\u202D" &&
element != "\u202E" &&
element != "\u064B" &&
element != "\u064C" &&
element != "\u064D" &&
element != "\u064E" &&
element != "\u064F" &&
element != "\u0650" &&
element != "\u0651" &&
element != "\u0652" &&
element != "\u0653")
{
length++;
}
}

View File

@ -35,10 +35,25 @@ namespace Nikse.SubtitleEdit.Core.Common.TextLengthCalculator
{
length++;
}
else
{
length++;
}
}
else if (element != "\u200E" &&
element != "\u200F" &&
element != "\u202A" &&
element != "\u202B" &&
element != "\u202C" &&
element != "\u202D" &&
element != "\u202E" &&
element != "\u064B" &&
element != "\u064C" &&
element != "\u064D" &&
element != "\u064E" &&
element != "\u064F" &&
element != "\u0650" &&
element != "\u0651" &&
element != "\u0652" &&
element != "\u0653")
{
length++;
}
}