mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-24 20:20:18 +08:00
Previously the function just bailed on invalid input, this instead makes it count how many replacement characters would be shown by a terminal complying with the Unicode specification's recommendation here: https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-3/#G66453 Fixes https://github.com/mpv-player/mpv/pull/17773#issuecomment-4277538534