mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
always open Android source files as UTF-8
Android Studio recommends "you use UTF-8 encoding whenever possible", so this code assumes the files use UTF-8. UTF-8 is also the default encoding on GNU/Linux and macOS. https://sites.google.com/a/android.com/tools/knownissues/encoding Windows will probably default to UTF16, since that's the native encoding for files. So forcing things to use UTF-8 should help compatibility.
This commit is contained in:
parent
0c31c4a5ab
commit
48c4354629
5 changed files with 26 additions and 20 deletions
|
|
@ -1021,7 +1021,7 @@ def copy_triple_t_store_metadata(apps):
|
|||
sg_list = glob.glob(os.path.join('build', packageName, 'settings.gradle*'))
|
||||
if sg_list:
|
||||
settings_gradle = sg_list[0]
|
||||
with open(settings_gradle) as fp:
|
||||
with open(settings_gradle, encoding='utf-8') as fp:
|
||||
data = fp.read()
|
||||
for matches in setting_gradle_pattern.findall(data):
|
||||
for m in matches:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue