NormalizeUnicode removes diacritics and decomposes ligatures with caching. Results are cached per input string (5 minute TTL) to avoid repeated expensive transformations. For the full normalization with additional punctuation handling, use NormalizeForMatching instead. Examples: - "Shōgun" → "Shogun
(s string)
| 123 | // - "æ" → "ae" |
| 124 | // - "fi" → "fi" |
| 125 | func NormalizeUnicode(s string) string { |
| 126 | return unicodeNormalizer.Normalize(s) |
| 127 | } |
| 128 | |
| 129 | // NormalizeForMatching applies cached full normalization for cross-seed matching: |
| 130 | // - Unicode normalization (removes diacritics, decomposes ligatures) |