From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.5120.1577064951007595112 for ; Sun, 22 Dec 2019 17:35:51 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2019 17:35:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,345,1571727600"; d="scan'208";a="242057989" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 22 Dec 2019 17:35:50 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 22 Dec 2019 17:35:50 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 22 Dec 2019 17:35:50 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.90]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.222]) with mapi id 14.03.0439.000; Mon, 23 Dec 2019 09:35:47 +0800 From: "Bob Feng" To: "Park, Aiden" , "devel@edk2.groups.io" Subject: Re: [PATCH V2] [edk2/BaseTools] edksetup.bat stuck on unicode locale Windows Thread-Topic: [PATCH V2] [edk2/BaseTools] edksetup.bat stuck on unicode locale Windows Thread-Index: AdW3Yp6ULT6acp7YSjm1LVLm5h3z3ABzoubA Date: Mon, 23 Dec 2019 01:35:46 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D161586922@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Park, Aiden=20 Sent: Saturday, December 21, 2019 2:25 AM To: Feng, Bob C ; devel@edk2.groups.io Subject: [PATCH V2] [edk2/BaseTools] edksetup.bat stuck on unicode locale W= indows This issue happens under two conditions. 1. Unicode language environment in Windows 2. Python2 (Not reproducible with Python3) Step to reproduce C:\edk2>edksetup.bat forcerebuild The edksetup.bat stuck at 'nmake cleanall'. Signed-off-by: Aiden Park --- BaseTools/Source/C/Makefiles/NmakeSubdirs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py b/BaseTools/Sourc= e/C/Makefiles/NmakeSubdirs.py index 356f5aca63..9b699ea086 100644 --- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py +++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py @@ -38,7 +38,7 @@ def RunCommand(WorkDir=3DNone, *Args, **kwargs): stdout, stderr =3D p.communicate() message =3D "" if stdout is not None: - message =3D stdout.decode(encoding=3D'utf-8', errors=3D'ignore') #= for compatibility in python 2 and 3 + message =3D stdout.decode(errors=3D'ignore') #for compatibility in= python 2 and 3 =20 if p.returncode !=3D 0: raise RuntimeError("Error while execute command \'{0}\' in direcot= ry {1}\n{2}".format(" ".join(Args), WorkDir, message)) --=20 2.16.2.windows.1