dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.4k stars 113 forks source link

introduce encoding_is_utf8() internal #2781

Closed dankamongmen closed 1 month ago

dankamongmen commented 1 month ago

apparently _nl_normalize_charset() of glibc removes everything but alnums, and converts to lowercase. replace strcmp() against "UTF-8" with encoding_is_utf8(), which matches this behavior, and supports the optional "cs" ("character set") prefix.

Closes #2780, reported by @barracuda156.

See https://github.com/bminor/glibc/blob/5f72f9800b250410cad3abfeeb09469ef12b2438/intl/l10nflist.c#L330-L334 and https://serverfault.com/questions/616744/is-there-a-difference-between-en-us-utf8-and-en-us-utf-8

dankamongmen commented 1 month ago

https://www.youtube.com/watch?v=PeMvMNpvB5M !

dankamongmen commented 1 month ago

this closed #2779 , not #2780