velthuis: encode ZWJ and ZWNJ
This commit is contained in:
parent
f787508c18
commit
78fde6f71a
2 changed files with 14 additions and 1 deletions
|
@ -39,8 +39,19 @@ START_TEST(test_encode_iast_to_velthuis)
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
||||||
|
START_TEST(test_encode_zwnj_and_zwj)
|
||||||
|
{
|
||||||
|
test_encoding_to_iast("ka+i", "ka\u200di");
|
||||||
|
test_encoding_to_velthuis("ka\u200di", "ka+i");
|
||||||
|
|
||||||
|
test_encoding_to_iast("ka_i", "ka\u200ci");
|
||||||
|
test_encoding_to_velthuis("ka\u200ci", "ka_i");
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
void register_velthuis_encoder_tests(TCase *test_case)
|
void register_velthuis_encoder_tests(TCase *test_case)
|
||||||
{
|
{
|
||||||
tcase_add_test(test_case, test_encode_velthuis_to_iast);
|
tcase_add_test(test_case, test_encode_velthuis_to_iast);
|
||||||
tcase_add_test(test_case, test_encode_iast_to_velthuis);
|
tcase_add_test(test_case, test_encode_iast_to_velthuis);
|
||||||
|
tcase_add_test(test_case, test_encode_zwnj_and_zwj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,9 @@ static const struct encoder_tuple table[] = {
|
||||||
{".n", "\u1e47"}, {".N", "\u1e46"},
|
{".n", "\u1e47"}, {".N", "\u1e46"},
|
||||||
{".s", "\u1e63"}, {".S", "\u1e62"},
|
{".s", "\u1e63"}, {".S", "\u1e62"},
|
||||||
|
|
||||||
{"/", "m\u0310"}, {".a", "'"}
|
{"/", "m\u0310"}, {".a", "'"},
|
||||||
|
{"_", "\u200c"}, /* ZWNJ */
|
||||||
|
{"+", "\u200d"} /* ZWJ */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct encoder_tuple *find_tuple(const char *text)
|
static const struct encoder_tuple *find_tuple(const char *text)
|
||||||
|
|
Loading…
Add table
Reference in a new issue