fix lowercase

This commit is contained in:
PyYoshi 2012-07-07 11:13:39 +09:00
parent d360ee9576
commit 0627b9183a
14 changed files with 17 additions and 16 deletions

View file

@ -195,15 +195,15 @@ float JapaneseContextAnalysis::GetConfidence(void)
PRInt32 SJISContextAnalysis::GetOrder(const char* str, PRUint32 *charLen)
{
//find out current char's byte length
if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f ||
if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f ||
(unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xfc )
*charLen = 2;
else
*charLen = 1;
//return its order if it is hiragana
if (*str == '\202' &&
(unsigned char)*(str+1) >= (unsigned char)0x9f &&
if (*str == '\202' &&
(unsigned char)*(str+1) >= (unsigned char)0x9f &&
(unsigned char)*(str+1) <= (unsigned char)0xf1)
return (unsigned char)*(str+1) - (unsigned char)0x9f;
return -1;

View file

@ -242,6 +242,6 @@ const SequenceModel Win1251BulgarianModel =
BulgarianLangModel,
(float)0.969392,
PR_FALSE,
"windows-1251",
"WINDOWS-1251",
"Bulgarian"
};

View file

@ -316,7 +316,7 @@ const SequenceModel Win1251Model =
RussianLangModel,
(float)0.976601,
PR_FALSE,
"windows-1251",
"WINDOWS-1251",
"Russian"
};

View file

@ -195,6 +195,6 @@ const SequenceModel iso_8859_2czechModel =
czechLangModel,
(float)0.968107,
PR_TRUE,
"iso-8859-2",
"ISO-8859-2",
"czech"
};

View file

@ -214,7 +214,7 @@ const SequenceModel Win1255Model =
HebrewLangModel,
(float)0.984004,
PR_FALSE,
"windows-1255",
"WINDOWS-1255",
"Hebrew"
};

View file

@ -239,6 +239,6 @@ const SequenceModel Win1250HungarianModel =
HungarianLangModel,
(float)0.965178,
PR_TRUE,
"windows-1250",
"WINDOWS-1250",
"hungarian"
};

View file

@ -195,6 +195,6 @@ const SequenceModel iso_8859_2polishModel =
polishLangModel,
(float)0.974309,
PR_TRUE,
"iso-8859-2",
"ISO-8859-2",
"polish"
};

View file

@ -195,6 +195,6 @@ const SequenceModel windows_1252spanishModel =
spanishLangModel,
(float)0.983906,
PR_TRUE,
"windows-1252",
"WINDOWS-1252",
"spanish"
};

View file

@ -50,7 +50,8 @@ public:
Reset();}
virtual ~nsEUCTWProber(void){delete mCodingSM;}
nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
const char* GetCharSetName() {return "x-euc-tw";}
const char* GetCharSetName() {return "EUC-TW";}
//const char* GetCharSetName() {return "x-euc-tw";}
nsProbingState GetState(void) {return mState;}
void Reset(void);
float GetConfidence(void);

View file

@ -52,7 +52,7 @@ public:
Reset();}
virtual ~nsGB18030Prober(void){delete mCodingSM;}
nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
const char* GetCharSetName() {return "gb18030";}
const char* GetCharSetName() {return "GB18030";}
nsProbingState GetState(void) {return mState;}
void Reset(void);
float GetConfidence(void);

View file

@ -59,7 +59,7 @@
#define MIN_MODEL_DISTANCE (0.01)
#define VISUAL_HEBREW_NAME ("ISO-8859-8")
#define LOGICAL_HEBREW_NAME ("windows-1255")
#define LOGICAL_HEBREW_NAME ("WINDOWS-1255")
PRBool nsHebrewProber::isFinal(char c)
{

View file

@ -48,7 +48,7 @@ public:
nsLatin1Prober(void){Reset();}
virtual ~nsLatin1Prober(void){}
nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
const char* GetCharSetName() {return "windows-1252";}
const char* GetCharSetName() {return "WINDOWS-1252";}
nsProbingState GetState(void) {return mState;}
void Reset(void);
float GetConfidence(void);

View file

@ -430,7 +430,7 @@ const SMModel SJISSMModel = {
6,
{eIdxSft4bits, eSftMsk4bits, eBitSft4bits, eUnitMsk4bits, SJIS_st },
SJISCharLenTable,
"Shift_JIS",
"SHIFT_JIS",
};

View file

@ -57,7 +57,7 @@ public:
Reset();}
virtual ~nsSJISProber(void){delete mCodingSM;}
nsProbingState HandleData(const char* aBuf, PRUint32 aLen);
const char* GetCharSetName() {return "Shift_JIS";}
const char* GetCharSetName() {return "SHIFT_JIS";}
nsProbingState GetState(void) {return mState;}
void Reset(void);
float GetConfidence(void);