Mercurial > audlegacy
annotate src/libguess/hebrew_impl.c @ 4391:a9c8efbfd4c2
s/BMP_PLUGIN_H/AUD_PLUGIN_H/
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 30 Mar 2008 00:51:14 +0200 |
parents | ce2d24746c09 |
children |
rev | line source |
---|---|
3215
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
1 const char *_guess_hw(const unsigned char *ptr, int size) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
2 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
3 int i; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
4 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
5 for (i = 0; i < size; i++) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
6 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
7 if (ptr[i] == 0x80 || (ptr[i] >= 0x82 && ptr[i] <= 0x89) || ptr[i] == 0x8B || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
8 (ptr[i] >= 0x91 && ptr[i] <= 0x99) || ptr[i] == 0x9B || ptr[i] == 0xA1 || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
9 (ptr[i] >= 0xBF && ptr[i] <= 0xC9) || |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
10 (ptr[i] >= 0xCB && ptr[i] <= 0xD8)) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
11 return "CP1255"; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
12 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
13 if (ptr[i] == 0xDF) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
14 return "ISO-8859-8-I"; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
15 } |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
16 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
17 return "ISO-8859-8-I"; |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
18 } |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
19 |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
20 const char *guess_hw(const char *ptr, int size) |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
21 { |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
22 return _guess_hw((const unsigned char *) ptr, size); |
ce2d24746c09
Add support for greek and hebrew character set detection.
William Pitcock <nenolod@atheme-project.org>
parents:
diff
changeset
|
23 } |