open-source-search-engine/UCNormalizer.h

27 lines
587 B
C
Raw Normal View History

2013-08-03 00:12:24 +04:00
#ifndef UCNORMALIZER_H___
#define UCNORMALIZER_H___
#define UC_KOMPAT_MASK 1
#define UC_COMPOSE_MASK 2
enum UCNormForm {
ucNFD = 0,
ucNFC = UC_COMPOSE_MASK,
ucNFKD = UC_KOMPAT_MASK,
ucNFKC = (UC_KOMPAT_MASK|UC_COMPOSE_MASK)
};
// Combined Kompatibility Form
2014-11-11 01:45:11 +03:00
int32_t ucNormalizeNFKC(UChar *outBuf, int32_t outBufSize,
UChar *inBuf, int32_t inBufSize, bool strip = false);
2013-08-03 00:12:24 +04:00
// Decomposed Kompatibility Form
2014-11-11 01:45:11 +03:00
int32_t ucNormalizeNFKD(UChar *outBuf, int32_t outBufSize,
UChar *inBuf, int32_t inBufSize);
2013-08-03 00:12:24 +04:00
bool initCompositionTable();
void resetCompositionTable() ;
#endif