From 9bd3ccdda523168589d7ee4d5c1a9d4610371791 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 1 Sep 2021 17:53:15 +0200 Subject: metadata: Force UTF-8 encoding --- ranger/core/metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/core/metadata.py b/ranger/core/metadata.py index 2c5165da..534c083c 100644 --- a/ranger/core/metadata.py +++ b/ranger/core/metadata.py @@ -86,7 +86,7 @@ class MetadataManager(object): self.metadata_cache[filename] = entry self.metafile_cache[metafile] = entries - with open(metafile, "w") as fobj: + with open(metafile, "w", encoding="utf-8") as fobj: json.dump(entries, fobj, check_circular=True, indent=2) def _get_entry(self, filename): @@ -119,7 +119,7 @@ class MetadataManager(object): return self.metafile_cache[metafile] if exists(metafile): - with open(metafile, "r") as fobj: + with open(metafile, "r", encoding="utf-8") as fobj: try: entries = json.load(fobj) except ValueError: -- cgit 1.4.1-2-gfad0 e.institute>
summary refs log blame commit diff stats
path: root/doc/pydoc/ranger.ext.openstruct.html
blob: d434080741611a7fd57d740e4ff683700730349f (plain) (tree)
1
2
3
4
5
6
7
8
9
10