Changeset 68913 in webkit
- Timestamp:
- Oct 1, 2010 12:38:00 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r68910 r68913 1 2010-10-01 Adam Roben <aroben@apple.com> 2 3 Encode Executive command arguments using UTF-8 on Cygwin 4 5 Cygwin's Python's os.execv doesn't support unicode command arguments. 6 Cygwin's execv expects arguments to be encoded using the current code 7 page. But code pages are limited in what characters they can handle, 8 and our tests include characters that the English code page can't 9 handle. So for now we'll just encode everything in UTF-8 on Cygwin, 10 which can handle all characters but might confuse some commands, for 11 expediency's sake. I'm sure we'll run into cases where UTF-8 isn't 12 good enough, but we can deal with that when the problem arises. 13 14 Reviewed by Adam Barth. 15 16 Fixes <http://webkit.org/b/46892> <rdar://problem/8496639> 17 webkitpy.common.system.executive_unittest.ExecutiveTest.test_run_command_with_unicode 18 fails on Windows 19 20 * Scripts/webkitpy/common/system/executive.py: 21 (Executive._run_command_with_teed_output): 22 (Executive.run_command): 23 On Cygwin, encode arguments using UTF-8. 24 1 25 2010-10-01 Sam Weinig <sam@webkit.org> 2 26 -
trunk/WebKitTools/Scripts/webkitpy/common/system/executive.py
r65979 r68913 104 104 def _run_command_with_teed_output(self, args, teed_output): 105 105 args = map(unicode, args) # Popen will throw an exception if args are non-strings (like int()) 106 if sys.platform == 'cygwin': 107 # Cygwin's Python's os.execv doesn't support unicode command 108 # arguments, and neither does Cygwin's execv itself. 109 # FIXME: Using UTF-8 here will confuse Windows-native commands 110 # which will expect arguments to be encoded using the current code 111 # page. 112 args = [arg.encode('utf-8') for arg in args] 106 113 child_process = subprocess.Popen(args, 107 114 stdout=subprocess.PIPE, … … 282 289 start_time = time.time() 283 290 args = map(unicode, args) # Popen will throw an exception if args are non-strings (like int()) 291 if sys.platform == 'cygwin': 292 # Cygwin's Python's os.execv doesn't support unicode command 293 # arguments, and neither does Cygwin's execv itself. 294 # FIXME: Using UTF-8 here will confuse Windows-native commands 295 # which will expect arguments to be encoded using the current code 296 # page. 297 args = [arg.encode('utf-8') for arg in args] 284 298 stdin, string_to_communicate = self._compute_stdin(input) 285 299 stderr = subprocess.STDOUT if return_stderr else None
Note: See TracChangeset
for help on using the changeset viewer.