-
-
Notifications
You must be signed in to change notification settings - Fork 987
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
Locale inconsistency on macOS #90
Comments
Hmm, I'm not really familiar with how locale() works on macOS. The only locale related thing kitty does is call locale.setlocale(locale.LC_ALL, '') in main.py at startup. I'm not sure what, if anything, it could be doing differently. |
So if you dont have the locale env vars set in your environment, I assume the other terminals are setting it explicitly. For example in iTerm2: https://github.com/gnachman/iTerm2/blob/faf3b633cee9d8749ca2f02a5b3226af4f93411f/sources/PTYSession.m#L1656 It seems wrong to me that a terminal emulator should set locale environment variables, that should be the job of the OS |
Yeah, that seems sensible, it just seems odd that the unset variables are defaulting to a secondary language rather than the primary language. It seems to suggest that macOS is setting |
Maybe the solution is, on macOS, to check if the LANG env var is set and if not set it based on the OS language preferences. |
OS: macOS 10.12.6 Beta (16G16b)
In iTerm 2 and Terminal.app,
locale
reportsIn Kitty,
locale
reportsI don't have the variables set explicitly in my shell config, so that may be normal. The weird part is that kitty seems to silently default the locale to
ru_RU
, leading to (for instance)git status
reportingKitty:
iTerm and Terminal.app:
English is set to my primary system language in OS X preferences, though I do also have Russian as a secondary language. Removing the secondary language or explicitly setting the
LC_MESSAGES
variable to anything other than the empty string resolves the issue, but it does seem a bit mysterious.The text was updated successfully, but these errors were encountered: