From 7fbd06945e28257119e450d76b95f69f3497a614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Tu=C4=8Dek?= Date: Wed, 6 Jun 2018 17:57:37 +0200 Subject: [PATCH] properly handle unicode characters in home dirs --- jupyter_core/paths.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jupyter_core/paths.py b/jupyter_core/paths.py index ad46e001..cd28f96a 100644 --- a/jupyter_core/paths.py +++ b/jupyter_core/paths.py @@ -21,7 +21,8 @@ def get_home_dir(): homedir = os.path.expanduser('~') # Next line will make things work even when /home/ is a symlink to # /usr/home as it is on FreeBSD, for example - homedir = os.path.realpath(homedir) + if sys.version_info.major == 2: + homedir = homedir.decode(sys.getfilesystemencoding()) return homedir _dtemps = {}