Hi,
The code for cleaning non-printable characters also replaces U+200D (ZERO WIDTH
JOINER) with U+FFFD (REPLACEMENT CHARACTER). This breaks displaying composite
emojis which are emoji ZWJ sequences.
I couldn’t compile and run the cpp tests, but the attached change fixes emoji
rendering for me. It may also fix
<
https://github.com/newsboat/newsboat/issues/3159>.
While looking at the code, I noticed that `substr_with_width_stfl` function
iterates by characters instead of graphemes – which seemed wrong. Also,
`substr_with_width` function has an incorrect comment. I’m not sure about its
intended functionality, but the tests pass on the Rust side with the attached
changes.
--
~sertaç
/seɾtatʃ/