| UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT = 0x0000000000400000ull, /**< @brief Other_Default_Ignorable_Code_Point */ | UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT = 0x0000000000400000ull, /**< @brief Other_Default_Ignorable_Code_Point */ | ||||
| UCD_PROPERTY_DEPRECATED = 0x0000000000800000ull, /**< @brief Deprecated */ | UCD_PROPERTY_DEPRECATED = 0x0000000000800000ull, /**< @brief Deprecated */ | ||||
| UCD_PROPERTY_SOFT_DOTTED = 0x0000000001000000ull, /**< @brief Soft_Dotted */ | UCD_PROPERTY_SOFT_DOTTED = 0x0000000001000000ull, /**< @brief Soft_Dotted */ | ||||
| UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION = 0x0000000002000000ull, /**< @brief Logical_Order_Exception */ | |||||
| }; | }; | ||||
| /** @brief Return the properties of the specified codepoint. | /** @brief Return the properties of the specified codepoint. | ||||
| Other_Default_Ignorable_Code_Point = UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT, /**< @brief Other_Default_Ignorable_Code_Point */ | Other_Default_Ignorable_Code_Point = UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT, /**< @brief Other_Default_Ignorable_Code_Point */ | ||||
| Deprecated = UCD_PROPERTY_DEPRECATED, /**< @brief Deprecated */ | Deprecated = UCD_PROPERTY_DEPRECATED, /**< @brief Deprecated */ | ||||
| Soft_Dotted = UCD_PROPERTY_SOFT_DOTTED, /**< @brief Soft_Dotted */ | Soft_Dotted = UCD_PROPERTY_SOFT_DOTTED, /**< @brief Soft_Dotted */ | ||||
| Logical_Order_Exception = UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION, /**< @brief Logical_Order_Exception */ | |||||
| }; | }; | ||||
| /** @brief Return the properties of the specified codepoint. | /** @brief Return the properties of the specified codepoint. |
| case 0x0600: | case 0x0600: | ||||
| if (c == 0x0673) return UCD_PROPERTY_DEPRECATED; | if (c == 0x0673) return UCD_PROPERTY_DEPRECATED; | ||||
| break; | break; | ||||
| case 0x0E00: | |||||
| if (c >= 0x0E40 && c <= 0x0E44) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| if (c >= 0x0EC0 && c <= 0x0EC4) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| break; | |||||
| case 0x1100: | case 0x1100: | ||||
| if (c >= 0x115F && c <= 0x1160) return UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; | if (c >= 0x115F && c <= 0x1160) return UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; | ||||
| break; | break; | ||||
| case 0x1700: | case 0x1700: | ||||
| if (c >= 0x17A3 && c <= 0x17A4) return UCD_PROPERTY_DEPRECATED; | if (c >= 0x17A3 && c <= 0x17A4) return UCD_PROPERTY_DEPRECATED; | ||||
| break; | break; | ||||
| case 0x1900: | |||||
| if (c >= 0x19B5 && c <= 0x19B7) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| if (c == 0x19BA) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| break; | |||||
| case 0x2100: | case 0x2100: | ||||
| if (c >= 0x2135 && c <= 0x2138) return UCD_PROPERTY_OTHER_MATH; | if (c >= 0x2135 && c <= 0x2138) return UCD_PROPERTY_OTHER_MATH; | ||||
| break; | break; | ||||
| if (c == 0x3164) return UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; | if (c == 0x3164) return UCD_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT; | ||||
| break; | break; | ||||
| case 0xAA00: | case 0xAA00: | ||||
| if (c >= 0xAAB5 && c <= 0xAAB6) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| if (c == 0xAAB9) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| if (c >= 0xAABB && c <= 0xAABC) return UCD_PROPERTY_LOGICAL_ORDER_EXCEPTION; | |||||
| if (c == 0xAAC0) return UCD_PROPERTY_DIACRITIC; | if (c == 0xAAC0) return UCD_PROPERTY_DIACRITIC; | ||||
| if (c == 0xAAC2) return UCD_PROPERTY_DIACRITIC; | if (c == 0xAAC2) return UCD_PROPERTY_DIACRITIC; | ||||
| break; | break; |
| props += (2 ** 22) * data.get('Other_Default_Ignorable_Code_Point', 0) | props += (2 ** 22) * data.get('Other_Default_Ignorable_Code_Point', 0) | ||||
| props += (2 ** 23) * data.get('Deprecated', 0) | props += (2 ** 23) * data.get('Deprecated', 0) | ||||
| props += (2 ** 24) * data.get('Soft_Dotted', 0) | props += (2 ** 24) * data.get('Soft_Dotted', 0) | ||||
| props += (2 ** 25) * data.get('Logical_Order_Exception', 0) | |||||
| return props | return props | ||||
| if __name__ == '__main__': | if __name__ == '__main__': |