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

Fix fixing JRuby shebangs on macOS #2280

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Fix fixing JRuby shebangs on macOS #2280

merged 1 commit into from
Oct 23, 2023

Conversation

mislav
Copy link
Member

@mislav mislav commented Oct 23, 2023

LC_CTYPE is "utf-8" on macOS, which instructs utilities like tr to expect Unicode input. However, in case of binary files, which we here explicitly guard against, the utility will fail because of invalid input encoding.

The solution is to set LC_CTYPE=C which effectively removes the expectation around input encoding and allows tr to process the input byte-by-byte.

Fixes #2279

LC_CTYPE is "utf-8" on macOS, which instructs utilities like `tr` to expect Unicode input. However, in case of binary files, which we here explicitly guard against, the utility will fail because of invalid input encoding.

The solution is to set LC_CTYPE=C which effectively removes the expectation around input encoding and allows `tr` to process the input byte-by-byte.
@mislav mislav requested a review from eregon October 23, 2023 03:52
@eregon eregon merged commit c3bae8b into master Oct 23, 2023
6 checks passed
@eregon eregon deleted the tr-fix branch October 23, 2023 10:11
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

Successfully merging this pull request may close these issues.

tr: Illegal byte sequence on macOS when installing JRuby
2 participants