"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ucs.cc" between
ocrad-0.25-pre5.tar.gz and ocrad-0.25-pre6.tar.gz

About: GNU Ocrad is an OCR (Optical Character Recognition) program. Pre-release.

ucs.cc  (ocrad-0.25-pre5):ucs.cc  (ocrad-0.25-pre6)
skipping to change at line 297 skipping to change at line 297
case 0xA8: return SSCARON; case 0xA8: return SSCARON;
case 0xB4: return CZCARON; case 0xB4: return CZCARON;
case 0xB8: return SZCARON; case 0xB8: return SZCARON;
case 0xBC: return CLIGOE; case 0xBC: return CLIGOE;
case 0xBD: return SLIGOE; case 0xBD: return SLIGOE;
case 0xBE: return CYDIAER; case 0xBE: return CYDIAER;
} }
return ch; return ch;
} }
// no funciona si 'code' == 0 // does not work for 'code' == 0
const char * UCS::ucs_to_utf8( const int code ) const char * UCS::ucs_to_utf8( const int code )
{ {
static char s[7]; static char s[7];
if( code < 0 || code > 0x7FFFFFFF ) { s[0] = 0; return s; } // invalid code if( code < 0 || code > 0x7FFFFFFF ) { s[0] = 0; return s; } // invalid code
if( code < 128 ) { s[0] = code; s[1] = 0; return s; } // plain ascii if( code < 128 ) { s[0] = code; s[1] = 0; return s; } // plain ascii
int i, mask; int i, mask;
if( code < 0x800 ) { i = 2; mask = 0xC0; } // 110X XXXX if( code < 0x800 ) { i = 2; mask = 0xC0; } // 110X XXXX
else if( code < 0x10000 ) { i = 3; mask = 0xE0; } // 1110 XXXX else if( code < 0x10000 ) { i = 3; mask = 0xE0; } // 1110 XXXX
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS