Skip to content

Commit

Permalink
Quick and dirty fix to allow WriteXmlIfChanged to write xml in utf-8,…
Browse files Browse the repository at this point in the history
… converting latin-1 directory paths.
  • Loading branch information
jfhenriques committed Dec 12, 2013
1 parent 90dbe71 commit a8b4942
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gyp/pylib/gyp/easy_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False,
# It has changed, write it
if existing != xml_string:
f = open(path, 'w')
try:
dec = unicode(xml_string, 'latin-1').encode('utf-8')
xml_string = dec
except Exception as inst:
pass
f.write(xml_string)
f.close()

Expand Down

0 comments on commit a8b4942

Please sign in to comment.