- if (c <= MAX_CHAR_BASIC_LATIN)
- {
- return list2 (Vcharset_ascii, make_int (c));
- }
- else if (c < 0xA0)
- {
- return list2 (Vcharset_control_1, make_int (c & 0x7F));
- }
- else if (c <= 0xff)
- {
- return list2 (Vcharset_latin_iso8859_1, make_int (c & 0x7F));
- }
- else if ((MIN_CHAR_GREEK <= c) && (c <= MAX_CHAR_GREEK))
- {
- return list2 (Vcharset_greek_iso8859_7,
- make_int (c - MIN_CHAR_GREEK + 0x20));
- }
- else if ((MIN_CHAR_CYRILLIC <= c) && (c <= MAX_CHAR_CYRILLIC))
- {
- return list2 (Vcharset_cyrillic_iso8859_5,
- make_int (c - MIN_CHAR_CYRILLIC + 0x20));
- }
- else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW))
- {
- return list2 (Vcharset_hebrew_iso8859_8,
- make_int (c - MIN_CHAR_HEBREW + 0x20));
- }
- else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI))
- {
- return list2 (Vcharset_thai_tis620,
- make_int (c - MIN_CHAR_THAI + 0x20));
- }
- else
- {
- return list3 (Vcharset_ucs_bmp,
- make_int (c >> 8), make_int (c & 0xff));
- }