From 2e3869ac7fa220e35444f08b95244b615adecf01 Mon Sep 17 00:00:00 2001 From: Tuk Date: Wed, 20 Dec 2017 11:48:08 +0100 Subject: [PATCH] Added python unicode encoding warning on unicode Powershell console. --- Shell-aliases.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Shell-aliases.md b/Shell-aliases.md index 3853feb..ae2dce7 100644 --- a/Shell-aliases.md +++ b/Shell-aliases.md @@ -33,6 +33,18 @@ Put this in your Powershell `$PROFILE` on Windows: iex "$(thefuck --alias)" ``` +To overcome Python unicode warnings on your unicode Powershell console: +``` +c:\python3\lib\site-packages\win_unicode_console\__init__.py:31: RuntimeWarning: sys.stdin.encoding == 'utf-8', whereas sys.stdout.encoding == 'ascii', readline hook consumer may assume they are the same + readline_hook.enable(use_pyreadline=use_pyreadline) +``` + +Add this line **before** the line above in your Powershell `$PROFILE` on Windows: + +``` +$env:PYTHONIOENCODING="utf-8" +``` + # tcsh ```tcsh