Using utf8 for jots
This commit is contained in:
parent
4ddbc1c915
commit
075bebc8c8
|
@ -13,10 +13,10 @@ def jots(data, readable=False):
|
|||
kwargs["indent"] = 4
|
||||
kwargs["separators"] = (",", ":")
|
||||
try:
|
||||
return dumps(data, **kwargs)
|
||||
return dumps(data, encoding="utf-8", **kwargs)
|
||||
except ValueError as e:
|
||||
return None
|
||||
|
||||
|
||||
# JSON decoder, converts a string to a python object
|
||||
def jsto(data):
|
||||
try:
|
||||
|
@ -65,4 +65,4 @@ def b642h(base64_data, altchars=None, url=False, use_bin=False):
|
|||
def ctos(_class):
|
||||
pattern = regex(r"[<'>]")
|
||||
cleaned = pattern.sub("", str(_class))
|
||||
return cleaned.split("class ", 1)[1].split(".")[-1]
|
||||
return cleaned.split("class ", 1)[1].split(".")[-1]
|
||||
|
|
Loading…
Reference in New Issue