1 /* 2 * Copyright 2011 kubtek <kubtek@mail.com> 3 * 4 * This file is part of StarDict. 5 * 6 * StarDict is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * StarDict is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with StarDict. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef _COLLATION_H_ 21 #define _COLLATION_H_ 22 23 typedef enum { 24 COLLATE_FUNC_NONE = -1, 25 UTF8_GENERAL_CI = 0, 26 UTF8_UNICODE_CI, 27 UTF8_BIN, 28 UTF8_CZECH_CI, 29 UTF8_DANISH_CI, 30 UTF8_ESPERANTO_CI, 31 UTF8_ESTONIAN_CI, 32 UTF8_HUNGARIAN_CI, 33 UTF8_ICELANDIC_CI, 34 UTF8_LATVIAN_CI, 35 UTF8_LITHUANIAN_CI, 36 UTF8_PERSIAN_CI, 37 UTF8_POLISH_CI, 38 UTF8_ROMAN_CI, 39 UTF8_ROMANIAN_CI, 40 UTF8_SLOVAK_CI, 41 UTF8_SLOVENIAN_CI, 42 UTF8_SPANISH_CI, 43 UTF8_SPANISH2_CI, 44 UTF8_SWEDISH_CI, 45 UTF8_TURKISH_CI, 46 COLLATE_FUNC_NUMS 47 } CollateFunctions; 48 49 extern int utf8_collate_init(CollateFunctions func); 50 extern int utf8_collate_init_all(); 51 extern int utf8_collate(const char *str1, const char *str2, CollateFunctions func); 52 extern void utf8_collate_end(CollateFunctions func); 53 extern void utf8_collate_end_all(); 54 extern CollateFunctions int_to_colate_func(int func); 55 56 #endif 57