Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Issue 23710010: ninja&make/mac: Convert .strings files to UTF-16LE, not just UTF-16. (Closed)

Created:
7 years, 3 months ago by Nico
Modified:
7 years, 3 months ago
Reviewers:
Robert Sesek
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

ninja&make/mac: Convert .strings files to UTF-16LE, not just UTF-16. OS X iconv makes "UTF-16" write UTF-16BE data. Just do the recoding in Python, which lets "UTF-16" write UTF-16LE data (I guess it uses the host byte order). Also saves a subprocess invocation while here. (Using "UTF-16LE" explicitly lets both iconv and python omit the BOM, so it's shorter to use "UTF-16" than "UTF-16LE" and explicitly writing a BOM.) This matches Xcode's behavior (at least Xcode 4.5). BUG=chromium:280718 R=rsesek@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1707

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M pylib/gyp/mac_tool.py View 1 2 3 1 chunk +3 lines, -5 lines 0 comments Download
M test/mac/gyptest-app.py View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Nico
7 years, 3 months ago (2013-08-28 23:58:38 UTC) #1
Nico
ptal https://codereview.chromium.org/23710010/diff/9001/pylib/gyp/mac_tool.py File pylib/gyp/mac_tool.py (right): https://codereview.chromium.org/23710010/diff/9001/pylib/gyp/mac_tool.py#newcode97 pylib/gyp/mac_tool.py:97: fp.write(s.decode(input_code).encode('UTF-16')) Do you remember why this used to ...
7 years, 3 months ago (2013-08-29 17:06:49 UTC) #2
Robert Sesek
https://codereview.chromium.org/23710010/diff/9001/pylib/gyp/mac_tool.py File pylib/gyp/mac_tool.py (right): https://codereview.chromium.org/23710010/diff/9001/pylib/gyp/mac_tool.py#newcode97 pylib/gyp/mac_tool.py:97: fp.write(s.decode(input_code).encode('UTF-16')) On 2013/08/29 17:06:50, Nico wrote: > Do you ...
7 years, 3 months ago (2013-08-29 17:48:23 UTC) #3
Nico
https://codereview.chromium.org/23710010/diff/12001/pylib/gyp/mac_tool.py File pylib/gyp/mac_tool.py (right): https://codereview.chromium.org/23710010/diff/12001/pylib/gyp/mac_tool.py#newcode97 pylib/gyp/mac_tool.py:97: fp.write(s.decode(input_code).encode('UTF-16')) On 2013/08/29 17:48:23, rsesek wrote: > Does this ...
7 years, 3 months ago (2013-08-29 17:49:38 UTC) #4
Nico
https://codereview.chromium.org/23710010/diff/12001/test/mac/gyptest-app.py File test/mac/gyptest-app.py (right): https://codereview.chromium.org/23710010/diff/12001/test/mac/gyptest-app.py#newcode49 test/mac/gyptest-app.py:49: test.must_contain(strings, '\xff\xfe' + '/* Localized'.encode('utf-16le')) On 2013/08/29 17:48:23, rsesek ...
7 years, 3 months ago (2013-08-29 17:55:10 UTC) #5
Robert Sesek
LGTM
7 years, 3 months ago (2013-08-29 18:02:23 UTC) #6
Nico
7 years, 3 months ago (2013-08-29 18:14:54 UTC) #7
Message was sent while issue was closed.
Committed patchset #6 manually as r1707 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698