Skip to content

Commit 56a06e5

Browse files
committed
Fix UnicodeEncodeError with non-ASCII paths, fixes #18
1 parent db861fb commit 56a06e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

jsonpointer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
try:
5050
from urllib import unquote
5151
from itertools import izip
52+
str = unicode
5253
except ImportError: # Python 3
5354
from urllib.parse import unquote
5455
izip = zip

tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_round_trip(self):
6161
"/k\"l",
6262
"/ ",
6363
"/m~0n",
64+
u'/\xee',
6465
]
6566
for path in paths:
6667
ptr = JsonPointer(path)

0 commit comments

Comments
 (0)