macOS bundle: Set the PYTHONIOENCODING env var to utf-8

There are apparently still some situations where python ends up with
ascii as its I/O encoding on macOS. See #724
This commit is contained in:
Kovid Goyal 2018-07-15 10:38:40 +05:30
parent 255cacf912
commit b3e2562c00
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -658,7 +658,9 @@ Categories=System;TerminalEmulator;
NSHighResolutionCapable=True,
NSSupportsAutomaticGraphicsSwitching=True,
LSApplicationCategoryType='public.app-category.utilities',
LSEnvironment={'KITTY_LAUNCHED_BY_LAUNCH_SERVICES': '1'},
# Ensure I/O encoding is always utf-8, see
# https://github.com/kovidgoyal/kitty/issues/724
LSEnvironment={'KITTY_LAUNCHED_BY_LAUNCH_SERVICES': '1', 'PYTHONIOENCODING': 'utf-8'},
)
plistlib.writePlist(pl, 'Info.plist')
os.rename('../share', 'Resources')