3 ms·
Locale in library functions in general is an example of solving problems at the wrong abstraction level. It also breaks the fundamental idea of how shell tools
by bborud 5y ago
Locale in library functions in general is an example of solving problems at the wrong abstraction level. It also breaks the fundamental idea of how shell tools are meant to be usable in unix. If they don't have stable outputs, then they become unusable.
(We had to create a set of locale-resistant and consistent versions of shell tools for a system that made heavy use of shell tools to process large amounts of data across thousands of machines. All you needed was one misconfigured locale on one machine and the result would be chaos).
You pay the cost every time rather than when you actually care about it. And when you really don't want locale to interfere it still comes back to haunt you if you don't pay special attention to it. (Remember how Python had locale-dependent XML-RPC that made sure two machines with different ways of formatting floats behaved?).
Locale is bad design. Very bad design.