[Webkit-unassigned] [Bug 87548] check-webkit-style cannot running in Chinese windows.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jan 13 18:23:07 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=87548
--- Comment #4 from huangxueqing <huangxueqing at baidu.com> 2013-01-13 18:24:55 PST ---
(In reply to comment #2)
> I thought that Executive was smart enough to use the local code page on windows?
I execute WebKit scripts in cygwin, sys.platform == 'cygwin' and python intergraded in cygwin did not include 'mbcs' decoder, thus it's always use 'utf-8' to decode output string. Actually GBK encoding used in my system but we could not dectect it.
> This line:
> File "/cygdrive/e/webkit/Tools/Scripts/webkitpy/common/system/executive.py", line 402, in run_command output = output.decode(self._child_process_encoding())
> Clearly its the wrong encoding in your case:
> http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/system/executive.py#L444
> 444 def _child_process_encoding(self):
> 445 # Win32 Python 2.x uses CreateProcessA rather than CreateProcessW
> 446 # to launch subprocesses, so we have to encode arguments using the
> 447 # current code page.
> 448 if sys.platform == 'win32' and sys.version < '3':
> 449 return 'mbcs'
> 450 # All other platforms use UTF-8.
> 451 # FIXME: Using UTF-8 on Cygwin will confuse Windows-native commands
> 452 # which will expect arguments to be encoded using the current code
> 453 # page.
> 454 return 'utf-8'
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list