krz/crumb

A local alternative to your browser's history. browser-history cli local-first privacy

Commit e2290bfab0

e2290bfab04d203a884165e0352fcdda92a891c3

parent: 8a24fc9d3c

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-01 05:45 UTC

Open history log as UTF-8

Ref #3

Layout: unified · split

search.py +1 −1
@@ -18,7 +18,7 @@ def search_log(query):
1818 print("No history file found.")
1919 return
2020
21 with open(LOG_PATH, "r") as f:
21 with open(LOG_PATH, "r", encoding="utf-8") as f:
2222 entries = f.read().split("* ")[1:]
2323
2424 found = 0
server.py +1 −1
@@ -51,7 +51,7 @@ def log_visit():
5151 favicon = data.get("favIconUrl", "")
5252 timestamp = datetime.utcnow().isoformat()
5353
54 with open(LOG_PATH, "a") as f:
54 with open(LOG_PATH, "a", encoding="utf-8") as f:
5555 f.write(f"* {title}\n")
5656 f.write(":PROPERTIES:\n")
5757 f.write(f":URL: {url}\n")