From b8130b22c5136d1a2e72053cb19eef0d0e6e14e3 Mon Sep 17 00:00:00 2001 From: none Date: Fri, 26 Jan 2024 19:27:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D0=B0=D0=B3=20=D0=BA=D0=BE=D0=B4=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/db.py b/db.py index fd44b9d..972533b 100644 --- a/db.py +++ b/db.py @@ -1,4 +1,3 @@ -# TODO: переделать import os import json @@ -16,6 +15,6 @@ def read_db(): return db def write_db(db): - js = json.dumps(db, indent=2) - with open("db.json", "w") as outfile: - outfile.write(js) \ No newline at end of file + js = json.dumps(db, indent=2, ensure_ascii=False) + with open("db.json", "w", encoding="utf-8") as outfile: + outfile.write(js)