|
@@ -63,12 +63,18 @@ def db_decode(vettSpec, string0):
|
|
|
def db_encode(vettSpec, string0):
|
|
|
res = ""
|
|
|
for char0 in string0:
|
|
|
-
|
|
|
- char0Hex = hex(ord(char0))
|
|
|
-
|
|
|
- char0ConvDec = next((el['intcode'] for el in vettSpec if el['unicode'] == char0Hex[2:].upper()), None)
|
|
|
-
|
|
|
- res += chr(int(char0ConvDec))
|
|
|
+
|
|
|
+
|
|
|
+ if char0 != "%" and "_":
|
|
|
+
|
|
|
+
|
|
|
+ char0Hex = hex(ord(char0))
|
|
|
+
|
|
|
+ char0ConvDec = next((el['intcode'] for el in vettSpec if el['unicode'] == char0Hex[2:].upper()), None)
|
|
|
+
|
|
|
+ res += chr(int(char0ConvDec))
|
|
|
+ else:
|
|
|
+ res += char0
|
|
|
return res
|
|
|
|
|
|
|