Created
October 11, 2019 17:50
-
-
Save jorgicio/6cff964a1dde5898f79069e7cbc63307 to your computer and use it in GitHub Desktop.
/etc/portage/patches/x11-terms/kitty-0.14.6/kitty-fix-surrogate-invalid.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/kitty/main.py b/kitty/main.py | |
--- a/kitty/main.py 2019-10-11 14:47:31.246901676 -0300 | |
+++ b/kitty/main.py 2019-10-11 14:48:48.475187475 -0300 | |
@@ -296,6 +296,9 @@ | |
os.environ['PATH'] = os.pathsep.join(existing_paths) | |
args = sys.argv[1:] | |
+ # Escaping surrogate characters if available | |
+ _args = [a.encode('utf-8','surrogateescape').decode('utf-8') for a in args] | |
+ args = _args | |
if is_macos and os.environ.pop('KITTY_LAUNCHED_BY_LAUNCH_SERVICES', None) == '1': | |
os.chdir(os.path.expanduser('~')) | |
args = macos_cmdline(args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment