1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 13 | Authors: Ed Batutis <ed@batutis.com> | 14 +----------------------------------------------------------------------+ 15 */ 16 17 #ifndef NORMALIZER_NORMALIZER_H 18 #define NORMALIZER_NORMALIZER_H 19 20 #include <php.h> 21 #include <unicode/utypes.h> 22 #if U_ICU_VERSION_MAJOR_NUM < 56 23 #include <unicode/unorm.h> 24 25 #define NORMALIZER_NONE UNORM_NONE 26 #define NORMALIZER_FORM_D UNORM_NFD 27 #define NORMALIZER_NFD UNORM_NFD 28 #define NORMALIZER_FORM_KD UNORM_NFKD 29 #define NORMALIZER_NFKD UNORM_NFKD 30 #define NORMALIZER_FORM_C UNORM_NFC 31 #define NORMALIZER_NFC UNORM_NFC 32 #define NORMALIZER_FORM_KC UNORM_NFKC 33 #define NORMALIZER_NFKC UNORM_NFKC 34 #define NORMALIZER_DEFAULT UNORM_DEFAULT 35 #else 36 #include <unicode/unorm2.h> 37 38 #define NORMALIZER_NONE 0x2 39 #define NORMALIZER_FORM_D 0x4 40 #define NORMALIZER_NFD NORMALIZER_FORM_D 41 #define NORMALIZER_FORM_KD 0x8 42 #define NORMALIZER_NFKD NORMALIZER_FORM_KD 43 #define NORMALIZER_FORM_C 0x10 44 #define NORMALIZER_NFC NORMALIZER_FORM_C 45 #define NORMALIZER_FORM_KC 0x20 46 #define NORMALIZER_NFKC NORMALIZER_FORM_KC 47 #define NORMALIZER_FORM_KC_CF 0x30 48 #define NORMALIZER_NFKC_CF NORMALIZER_FORM_KC_CF 49 #define NORMALIZER_DEFAULT NORMALIZER_FORM_C 50 #endif 51 52 void normalizer_register_constants( INIT_FUNC_ARGS ); 53 54 #endif // NORMALIZER_NORMALIZER_H 55