aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-01-16 19:10:42 +0100
committerGitHub <noreply@github.com>2019-01-16 19:10:42 +0100
commit900dc851e6c810f9e1772a6fb901a5a7e2801baf (patch)
tree205bac3cd6df971ee18739e59bd4da0ffe91718b /Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs
parent07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (diff)
parent933ef438894ed233fec46badf58dd4f26492e832 (diff)
Merge branch 'dev' into cleanup
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs')
-rw-r--r--Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs
index 084797c5e..a469e2a0c 100644
--- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs
+++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs
@@ -21,7 +21,7 @@
* Contributor(s):
* Shy Shalom <shooshX@gmail.com>
* Rudi Pettazzi <rudi.pettazzi@gmail.com> (C# port)
- *
+ *
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
@@ -46,11 +46,11 @@ namespace UniversalDetector.Core
public UTF8Prober()
{
- numOfMBChar = 0;
+ numOfMBChar = 0;
codingSM = new CodingStateMachine(new UTF8SMModel());
Reset();
}
-
+
public override string GetCharsetName() {
return "UTF-8";
}
@@ -66,7 +66,7 @@ namespace UniversalDetector.Core
{
int codingState = SMModel.START;
int max = offset + len;
-
+
for (int i = offset; i < max; i++) {
codingState = codingSM.NextState(buf[i]);
@@ -97,7 +97,7 @@ namespace UniversalDetector.Core
{
float unlike = 0.99f;
float confidence = 0.0f;
-
+
if (numOfMBChar < 6) {
for (int i = 0; i < numOfMBChar; i++)
unlike *= ONE_CHAR_PROB;