0
|
1 static const char *_guess_gr(const unsigned char *ptr, int size)
|
|
2 {
|
|
3 int i;
|
|
4
|
|
5 for (i = 0; i < size; i++)
|
|
6 {
|
|
7 if (ptr[i] == 0x80 ||
|
|
8 (ptr[i] >= 0x82 && ptr[i] <= 0x87) ||
|
|
9 ptr[i] == 0x89 || ptr[i] == 0x8B ||
|
|
10 (ptr[i] >= 0x91 && ptr[i] <= 0x97) ||
|
|
11 ptr[i] == 0x99 || ptr[i] == 0x9B || ptr[i] == 0xA4 ||
|
|
12 ptr[i] == 0xA5 || ptr[i] == 0xAE)
|
|
13 return "CP1253";
|
|
14 }
|
|
15
|
|
16 return "ISO-8859-7";
|
|
17 }
|
|
18
|
|
19 const char *guess_gr(const char *ptr, int size)
|
|
20 {
|
|
21 return _guess_gr((const unsigned char *) ptr, size);
|
|
22 }
|