mirror of
https://github.com/Justuser3310/ss14_chemistry_site.git
synced 2025-02-08 09:07:38 +00:00
Исправлен баг кодировки
This commit is contained in:
parent
d5cc266671
commit
b8130b22c5
7
db.py
7
db.py
@ -1,4 +1,3 @@
|
|||||||
# TODO: переделать
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -16,6 +15,6 @@ def read_db():
|
|||||||
return db
|
return db
|
||||||
|
|
||||||
def write_db(db):
|
def write_db(db):
|
||||||
js = json.dumps(db, indent=2)
|
js = json.dumps(db, indent=2, ensure_ascii=False)
|
||||||
with open("db.json", "w") as outfile:
|
with open("db.json", "w", encoding="utf-8") as outfile:
|
||||||
outfile.write(js)
|
outfile.write(js)
|
||||||
|
Loading…
Reference in New Issue
Block a user