Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Started receiving awk errors related to locale. #279

Open
pmyjavec opened this issue Jan 19, 2020 · 0 comments
Open

Started receiving awk errors related to locale. #279

pmyjavec opened this issue Jan 19, 2020 · 0 comments

Comments

@pmyjavec
Copy link

pmyjavec commented Jan 19, 2020

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?

@pmyjavec pmyjavec changed the title Started receiving awk errors Started receiving awk errors related to locale. Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant