[normalize] Adding NORMALIZE_STRING_COMPOSE for NFC unicode normalization

This commit is contained in:
Al
2016-05-28 19:25:12 -04:00
parent 1fd57fdda3
commit 1d1ada1bc1
2 changed files with 6 additions and 0 deletions

View File

@@ -19,6 +19,11 @@ char *normalize_string_utf8(char *str, uint64_t options) {
utf8proc_options |= UTF8PROC_OPTIONS_NFD;
}
if (options & NORMALIZE_STRING_COMPOSE) {
have_utf8proc_options = true;
utf8proc_options |= UTF8PROC_OPTIONS_NFC;
}
if (options & NORMALIZE_STRING_STRIP_ACCENTS) {
have_utf8proc_options = true;
utf8proc_options |= UTF8PROC_OPTIONS_STRIP_ACCENTS;