News for hackers. Stuff that matters.
Re:Setting the TZ environment variable avoids thousands of s... by zajio1am on Thursday January 12, 2023 @05:44AM (#34351695)
> If they are supposed to act locale-specific, then this "trick" simply leads to wrong results and should be avoided.

These tools are definitely supposed to act locale-specific (e.g. '.' regular expression should match one unicode codepoint even if it is multibyte), but in many cases one uses it on ASCII-only data (e.g. logs from system daemons that runs with LC=C anyways), so using this 'trick' is fine.

Mainly, i use this trick not for speedup, but because grep (with UTF-8 locale) has issues with invalid UTF-8 sequences in data, while grep with C locale accepts them.

There are no comments on this comment yet.