diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-11 12:50:36 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-11 12:50:36 +0100 |
| commit | e2751d42e8775596b7c4b929fd004d879f980947 (patch) | |
| tree | da1d6e703abbb6a47cd64730603f06dc4b51df8f /Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs | |
| parent | ec1f5dc317182582ebff843c9e8a4d5277405469 (diff) | |
| parent | e5c2dbdf23267006ef151d6ee8ab1cea147123d7 (diff) | |
Merge branch 'dev' into code-cleanup
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs')
| -rw-r--r-- | Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs index 760fca9bd..19152a7ac 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs @@ -44,12 +44,12 @@ namespace UniversalDetector.Core private CodingStateMachine codingSM; private BIG5DistributionAnalyser distributionAnalyser; private byte[] lastChar = new byte[2]; - + public Big5Prober() { this.codingSM = new CodingStateMachine(new BIG5SMModel()); this.distributionAnalyser = new BIG5DistributionAnalyser(); - this.Reset(); + this.Reset(); } public override ProbingState HandleData(byte[] buf, int offset, int len) @@ -73,7 +73,7 @@ namespace UniversalDetector.Core lastChar[1] = buf[offset]; distributionAnalyser.HandleOneChar(lastChar, 0, charLen); } else { - distributionAnalyser.HandleOneChar(buf, i-1, charLen); + distributionAnalyser.HandleOneChar(buf, i-1, charLen); } } } @@ -84,23 +84,23 @@ namespace UniversalDetector.Core state = ProbingState.FoundIt; return state; } - + public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; distributionAnalyser.Reset(); } - + public override string GetCharsetName() { - return "Big-5"; + return "Big-5"; } - + public override float GetConfidence() { return distributionAnalyser.GetConfidence(); } - + } } |
