From f24e93e8ba0403556b2e3b905790ad356c0f3757 Mon Sep 17 00:00:00 2001
From: Elena Grandi <valhalla-d@trueelena.org>
Date: Sat, 5 Nov 2016 13:50:56 +0100
Subject: Fix parsing of unicode paths on non-unicode locales

Forwarded: https://github.com/bebraw/pypandoc/issues/122

---
 pypandoc/__init__.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pypandoc/__init__.py b/pypandoc/__init__.py
index 8da7529..c6f18ec 100644
--- a/pypandoc/__init__.py
+++ b/pypandoc/__init__.py
@@ -149,8 +149,7 @@ def _identify_path(source):
     try:
         path = os.path.exists(source)
     except UnicodeEncodeError:
-        source = source.encode('utf-8')
-        path = os.path.exists(source)
+        path = os.path.exists(source.encode('utf-8'))
     except:
         path  # still false
 
