mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10: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
|
|
@ -1384,7 +1384,7 @@ def write_metadata(metadatapath, app):
|
|||
raise MetaDataException('Cannot write "%s", not an accepted format, use: %s' % (
|
||||
metadatapath, ', '.join(accepted)))
|
||||
|
||||
with open(metadatapath, 'w') as mf:
|
||||
with open(metadatapath, 'w', encoding='utf8') as mf:
|
||||
if ext == 'txt':
|
||||
return write_txt(mf, app)
|
||||
elif ext == 'yml':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue