Support unicode keys in library/python/resource.
+from _codecs import utf_8_decode, utf_8_encode
+
from libcpp cimport bool
@@ -34,6 +36,9 @@ def key_by_index(idx):
def find(s):
cdef TString res
+ if isinstance(s, str):
+ s = utf_8_encode(s)[0]
+
if FindExact(TStringBuf(s, len(s)), &res):
return res.c_str()[:res.length()]
