Mercurial > libguess
view greek_impl.c @ 2:754a4550c64e
- added arabic, greek, hebrew and turkish DFAs
- new UCS-2LE/BE DFAs
- now arabic_impl.c uses arabic DFAs
- dfa common macros have been moved to dfa.h
- minor cleanups
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Wed, 11 Jun 2008 00:11:30 +0900 |
parents | d9b6ff839eab |
children | 70e2c306231e |
line wrap: on
line source
static const char *_guess_gr(const unsigned char *ptr, int size) { int i; for (i = 0; i < size; i++) { if (ptr[i] == 0x80 || (ptr[i] >= 0x82 && ptr[i] <= 0x87) || ptr[i] == 0x89 || ptr[i] == 0x8B || (ptr[i] >= 0x91 && ptr[i] <= 0x97) || ptr[i] == 0x99 || ptr[i] == 0x9B || ptr[i] == 0xA4 || ptr[i] == 0xA5 || ptr[i] == 0xAE) return "CP1253"; } return "ISO-8859-7"; } const char *guess_gr(const char *ptr, int size) { return _guess_gr((const unsigned char *) ptr, size); }