z
z copied to clipboard
Started receiving awk errors related to locale.
Recently, I stared receiving awk errors:
awk: cmd. line:49: (FILENAME=- FNR=11) warning: Invalid multibyte data detected. There may be a mismatch between your data and your locale.
It seems this has to do with the locale setting on my machine not being set to C
and some interplay between awk and lower level libraries. Further discussion can be read here.
I fixed this by setting the environment variable to LC_ALL=C
within the z.sh
script as a workaround:
LC_ALL=C awk...
I don't think it's appropriate to ask people to change their locale settings machine wide or even in their shell to remove these warning.
I'm wondering if this is a good idea to have added to the script permanently via PR? I guess this may have something to do with the way awk
or dependent library was compiled on my current machine (Arch Linux); However it can still happen to anyone in a similar situation.
Thoughts?