diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index 56cafac..d5b29db 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -1720,16 +1720,12 @@ class utfBin(): def _intToChar(self, x): he = hex(x)[2:] - ret = None - exec ("ret = '\\x%s'" % he) - return ret + return chr(int(he, 16)) def _hexToChar(self, he): - ret = None - exec ("ret = '\\x%s'" % he) - return ret + return chr(int(he, 16)) - def encode(self, text): + def encode(self, text): """Кодирует смешанный формат в UTF-8""" ind = 0 utf = []