Properly decode lines in targets.android.TargetAndroid._update_libraries_references
This commit is contained in:
parent
827f943698
commit
075e11ab3b
1 changed files with 5 additions and 4 deletions
|
@ -850,10 +850,11 @@ class TargetAndroid(Target):
|
||||||
|
|
||||||
# recreate the project.properties
|
# recreate the project.properties
|
||||||
with io.open(project_fn, 'w', encoding='utf-8') as fd:
|
with io.open(project_fn, 'w', encoding='utf-8') as fd:
|
||||||
try:
|
lines = [
|
||||||
fd.writelines((line.encode('utf-8') for line in content))
|
line if isinstance(line, unicode) else line.decode('utf-8')
|
||||||
except:
|
for line in content
|
||||||
fd.writelines(content)
|
]
|
||||||
|
fd.writelines(lines)
|
||||||
if not content[-1].endswith(u'\n'):
|
if not content[-1].endswith(u'\n'):
|
||||||
fd.write(u'\n')
|
fd.write(u'\n')
|
||||||
for index, ref in enumerate(references):
|
for index, ref in enumerate(references):
|
||||||
|
|
Loading…
Reference in a new issue