-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Set $LANG env var using languageCode, countryCode #1087
Conversation
src/locale.rs
Outdated
env::set_var("LANG", &locale_id); | ||
env::set_var("LC_CTYPE", &locale_id); | ||
// env::set_var("LC_CTYPE", &locale_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This something that should be deleted, seemed a bit unclear from the dicsussion of #993 if it should be set or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
er yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried both, and it didn't seem to make a difference. iTerm doesn't appear to set it, so I'm opting to leave it out, but I'd be happy to put it back in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a Mac user anymore, so I can't really weigh in here, but copying iTerm seems reasonable.
ping |
@jwilm anything else I need to do to get this merged? |
@sodiumjoe Probably mostly a matter of time. There are a few PRs that are good to go but just waiting for approval. |
@chrisduerr ok, sounds good, thanks! |
fixes #1203 |
Works for me, LC_TYPE is now correctly set to |
Went to try this out today and discovered that it doesn't run on macOS 10.11 (El Capitan). The problem seems to be that at least |
@jwilm ok I'm learning piecemeal why each part of the iterm code for this exists. I guess that's what this else block handles: https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L7099 I can try to add that into this branch, but I'm going to have a hard time testing, since I don't have a machine with <10.12 on it. What exactly happens when you run this on El Capitan? |
It looks like even Does alacritty have an official set of OS versions it supports? |
I think there never was any official decision from jwilm which versions are supported. Until now the issue just didn't come up where people had issues running it on old versions. |
@chrisduerr ok, for now I'll work on porting the conditional code from iterm2, I realized I have an older imac I can test on. |
@sodiumjoe we don't have an official macOS version we are aiming to support, but the unofficial minimum version is the one running on my laptop 😉 (El Capitan). The observed behavior is simply a segfault and message from the Objective C runtime about the |
@jwilm so what you're saying is I just need to upgrade your laptop 😂 Thanks for that info, I'll try to get to that tonight. |
That's one way of solving it. :D |
@jwilm Added logic to fallback to |
@sodiumjoe this looks great; thanks for making the modifications to fall back to One last thing -- there are conflicts with master which prevents this from being merged. Would you mind rebasing? |
@jwilm np, is it acceptable practice to rebase and |
@sodiumjoe yes, that would even be ideal. |
add logic to fallback to `localeIdentifier` if `currentLocale.languageCode` and `currentLocale.countryCode` are not available.
5cdb911
to
f8fb0ed
Compare
@jwilm done |
great; thanks! |
fixes #993
Using logic from https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L1703