Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In C (POSIX.1-2008, specifically), there's tolower_l() and the rest of the _l functions for this use case, which take a locale as an argument. That let's you ask for the English (or even "C locale") lowercase versions of these English words, even when your process's current locale is Turkish.

https://www.man7.org/linux/man-pages/man3/tolower_l.3.html



The mention of _l functions reminded me of this gloriously over the top git message/rant.

"Those not comfortable with toxic language should pretend this is a religious text."

https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: