Show
Ignore:
Timestamp:
04/20/08 19:59:23 (7 months ago)
Author:
astrange
Message:

Improve autodetection of Korean text.
Patch by Cheolgi Kim (cheolgi - gmail com)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/UniversalDetector/universalchardet/src/nsMBCSSM.cpp

    r406 r859  
    4343*/ 
    4444 
     45/* 
     46Modification from frank tang's original work: (Modified by Cheolgi Kim 
     47. Korean CharSet of EUC-KR is extended to CP949, which allows more characters. 
     48  Thus, Error condition of EUC-KR is relaxed. 
     49*/ 
     50 
    4551// BIG5  
    4652 
     
    171177PCK4BITS(1,1,1,1,1,1,1,1),  // 70 - 77  
    172178PCK4BITS(1,1,1,1,1,1,1,1),  // 78 - 7f  
    173 PCK4BITS(0,0,0,0,0,0,0,0),  // 80 - 87  
    174 PCK4BITS(0,0,0,0,0,0,0,0),  // 88 - 8f  
    175 PCK4BITS(0,0,0,0,0,0,0,0),  // 90 - 97  
    176 PCK4BITS(0,0,0,0,0,0,0,0),  // 98 - 9f  
     179PCK4BITS(0,2,2,2,2,2,2,2),  // 80 - 87  
     180PCK4BITS(2,2,2,2,2,2,2,2),  // 88 - 8f  
     181PCK4BITS(2,2,2,2,2,2,2,2),  // 90 - 97  
     182PCK4BITS(2,2,2,2,2,2,2,2),  // 98 - 9f  
    177183PCK4BITS(0,2,2,2,2,2,2,2),  // a0 - a7  
    178 PCK4BITS(2,2,2,2,2,3,3,3),  // a8 - af  
     184PCK4BITS(2,2,2,2,2,2,2,2),  // a8 - af  
    179185PCK4BITS(2,2,2,2,2,2,2,2),  // b0 - b7  
    180186PCK4BITS(2,2,2,2,2,2,2,2),  // b8 - bf  
     
    186192PCK4BITS(2,2,2,2,2,2,2,2),  // e8 - ef  
    187193PCK4BITS(2,2,2,2,2,2,2,2),  // f0 - f7  
    188 PCK4BITS(2,2,2,2,2,2,2,0)   // f8 - ff  
     194PCK4BITS(2,2,2,2,2,2,3,0)   // f8 - ff  
    189195}; 
    190196 
     
    192198static PRUint32 EUCKR_st [ 2] = { 
    193199PCK4BITS(eError,eStart,     3,eError,eError,eError,eError,eError),//00-07  
    194 PCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eError,eError,eStart,eStart) //08-0f  
     200PCK4BITS(eItsMe,eItsMe,eItsMe,eItsMe,eStart,eStart,eStart,eStart) //08-0f  
    195201}; 
    196202