Characters with decompositions starting with # do not decompose any more.

This commit is contained in:
Simon Rozman 2016-04-11 10:21:11 +02:00
parent 02f164cee6
commit fc93474b9a

View File

@ -131,12 +131,19 @@ void ZRCOLA_API ZRCola::translation_db::Decompose(_In_z_count_(inputMax) const w
else if (decompSrc < c) l = m + 1; else if (decompSrc < c) l = m + 1;
else { else {
// Character found. // Character found.
if (trans.str_len && trans.str[0] != L'#') {
// Append decomposed sequence.
output.append(trans.str, trans.str_len); output.append(trans.str, trans.str_len);
i++; i++;
if (map) { if (map) {
// Mapping changed. // Mapping changed.
map->push_back(ZRCola::mapping(i, output.length())); map->push_back(ZRCola::mapping(i, output.length()));
} }
} else {
// Character is inhibited to decompose.
output += c;
i++;
}
break; break;
} }
} else { } else {