lib/icu/Canonicalize: convert all punctuation to ASCII

To make tag matching easier.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1669
This commit is contained in:
Max Kellermann
2022-11-15 18:49:33 +01:00
parent d7f545721b
commit 53530bd1d5
5 changed files with 62 additions and 0 deletions

View File

@@ -143,6 +143,18 @@ TEST_F(StringFilterTest, Normalize)
#endif
#ifdef HAVE_ICU
TEST_F(StringFilterTest, Transliterate)
{
const StringFilter f{"'", true, false, false, false};
EXPECT_TRUE(f.Match(""));
EXPECT_FALSE(f.Match("\""));
}
#endif
TEST_F(StringFilterTest, FoldCase)
{
const StringFilter f{"nëedlé", true, false, false, false};