News for hackers. Stuff that matters.
Re:Glibc: [0-9] matches ¼ ١ 2 〣 and others, but not 9 (and o... by patrec on Wednesday July 18, 2018 @05:13PM (#17562109)
This works till you want at least minimal UTF-8 support, such as when you're working with actual English text as opposed to human-readable computerese.
Re:Glibc: [0-9] matches ¼ ١ 2 〣 and others, but not 9 (and o... by kazinator on Thursday July 19, 2018 @07:26PM (#17571249)
Sticking to the "C" locale will work even if you want UTF-8 support. You just roll your own UTF-8 support.

I built the TXR language entirely without any of the harmful garbage that is the ISO C/POSIX localization. It handles UTF-8 just fine.

The C localization stuff was developed too early, at a time when nobody had any real experience with localization. Before Unicode, before the Internet.

Before threads! How the do you set it up so that one thread runs in one locale and another in another? That's important if a global server is servicing two different requests simultaneously from users in two different locales. The idiotic C locale stuff relies on global variables.

You set some magic variables and, poof; numerous functions in your entire image change their behavior, whether they are working with internationalized data or not.

The setlocale function might as well be called fuck_my_program_please.