Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
revert unicode handling in kanwa.py
Browse files Browse the repository at this point in the history
  • Loading branch information
miurahr committed Mar 25, 2018
1 parent c99e778 commit ff22a5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pykakasi/kanwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def __init__(self):
self._kanwadict = dbm.open(dictpath,'r')

def load(self, char):
key = "%04x"%ord(six.u(char))
if six.PY2:
key = "%04x"%ord(unicode(char))
else:
key = "%04x"%ord(char)
try: #already exist?
table = self._jisyo_table[key]
except:
Expand Down

0 comments on commit ff22a5b

Please sign in to comment.