Chromium Code Reviews| Index: pylib/gyp/mac_tool.py |
| =================================================================== |
| --- pylib/gyp/mac_tool.py (revision 1702) |
| +++ pylib/gyp/mac_tool.py (working copy) |
| @@ -87,16 +87,14 @@ |
| # semicolon in dictionary. |
| # on invalid files. Do the same kind of validation. |
| import CoreFoundation |
| - s = open(source).read() |
| + s = open(source, 'rb').read() |
| d = CoreFoundation.CFDataCreate(None, s, len(s)) |
| _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) |
| if error: |
| return |
| - fp = open(dest, 'w') |
| - args = ['/usr/bin/iconv', '--from-code', input_code, '--to-code', |
| - 'UTF-16', source] |
| - subprocess.call(args, stdout=fp) |
| + fp = open(dest, 'wb') |
| + fp.write(s.decode(input_code).encode('UTF-16')) |
|
Nico
2013/08/29 17:06:50
Do you remember why this used to shell out to icon
Robert Sesek
2013/08/29 17:48:23
It's what an older Xcode did specifically.
|
| fp.close() |
| def _DetectInputEncoding(self, file_name): |