From 7bfb04c09d3b5c8488a7e6e846fea40c858cddad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Tu=C4=8Dek?= Date: Sun, 20 May 2018 15:45:57 +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..cf536bf2 100644 --- a/jupyter_core/paths.py +++ b/jupyter_core/paths.py @@ -12,6 +12,7 @@ import os import sys import tempfile +from builtins import str pjoin = os.path.join @@ -21,7 +22,7 @@ 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) + homedir = str(os.path.realpath(homedir), sys.getfilesystemencoding()) return homedir _dtemps = {}