Skip to content

Commit

Permalink
fixed #14 can't detect short euc-kr
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed May 13, 2021
1 parent 0ff2649 commit 876d392
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Mozilla's Universal Charset Detector C/C++ library


*** 1.0.6

2021/05/14 KST
- fixed #14 can't detect short euc-kr

2019/08/01 KST
- fixed #13 bom member has been added to the DetectObj structure
- fixed #15 support automake style 'make check'
Expand Down
2 changes: 1 addition & 1 deletion src/CharDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
float CharDistributionAnalysis::GetConfidence()
{
//if we didn't receive any character in our consideration range, return negative answer
if (mTotalChars <= 0 || mFreqChars <= mDataThreshold)
if (mTotalChars <= 0)
return SURE_NO;

if (mTotalChars != mFreqChars) {
Expand Down
5 changes: 3 additions & 2 deletions test/sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ int main (int argc, char ** argv) {
int i, ret = 0;

char *str[] = {
"안녕",
// at lesat over 6 character
"안녕히",
"안녕하세요",
"안녕하세요 정말?",
"그래 이정도면 판단 될까?",
"좀더 길게 적어 볼까 얼마나 길게 해야!",
"좀더 길게 적어 볼까 얼마나 길게 Œc방각하(CP949) 해야!",
"그래 그래 좀 더 길게 적어 보자 더 길게 적어 보야야 겠지...",
"12345 abcde"
};
Expand Down
4 changes: 2 additions & 2 deletions test/sample1.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ int main (int argc, char ** argv) {
int i, ret = 0;

char *str[] = {
"안녕",
"안녕히",
"안녕하세요",
"안녕하세요 정말?",
"그래 이정도면 판단 될까?",
"좀더 길게 적어 볼까 얼마나 길게 해야!",
"좀더 길게 적어 볼까 얼마나 길게 Œc방각하(CP949) 해야!",
"그래 그래 좀 더 길게 적어 보자 더 길게 적어 보야야 겠지...",
"12345 abcde"
};
Expand Down

0 comments on commit 876d392

Please sign in to comment.