mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 23:40:29 +03:00
read/write F-Droid files always as UTF-8
This makes UTF-8 the sole supported encoding for F-Droid's files. This is mostly codifying the already existing practice for config.py and index.xml. The other files where always just ASCII before. * config.py * metadata/*.txt * known_apks.txt * categories.txt * latestapps.txt * latestapps.dat * index.xml Note: this does not change the read/write encoding of stats files. That is still ASCII.
This commit is contained in:
parent
444e8ad982
commit
afd528731a
5 changed files with 12 additions and 12 deletions
|
|
@ -33,7 +33,7 @@ def proper_format(app):
|
|||
s = io.StringIO()
|
||||
# TODO: currently reading entire file again, should reuse first
|
||||
# read in metadata.py
|
||||
with open(app.metadatapath, 'r') as f:
|
||||
with open(app.metadatapath, 'r', encoding='utf8') as f:
|
||||
cur_content = f.read()
|
||||
metadata.write_txt(s, app)
|
||||
content = s.getvalue()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue