You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, just read your interesting blog post about sorting. In case you weren't already aware, there's already a well-supported way for programs to be locale-aware on Linux: a set of environment variables, the main one being LANG.
The full list is here, but there's also LC_COLLATE which is specifically for "sorting and regular expressions". If you are so inclined, I'd suggest parsing these variables and using them in the appropriate priority order (see the linked page). Personally at that point I'd remove the --locale flag altogether, but you could also leave it in as an override.
The text was updated successfully, but these errors were encountered:
I think I've gotten some of the benefits with this commit: 157141f . Basically, if user does not specify a --locale, the program will attempt to read the LANG environmental variable (rather than default to en-US). If the program can't read LANG, it then uses en-US.
I'll try to figure out how to use LC_COLLATE soon.
Hey, just read your interesting blog post about sorting. In case you weren't already aware, there's already a well-supported way for programs to be locale-aware on Linux: a set of environment variables, the main one being
LANG
.The full list is here, but there's also
LC_COLLATE
which is specifically for "sorting and regular expressions". If you are so inclined, I'd suggest parsing these variables and using them in the appropriate priority order (see the linked page). Personally at that point I'd remove the--locale
flag altogether, but you could also leave it in as an override.The text was updated successfully, but these errors were encountered: