From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.16267.1572923011592026317 for ; Mon, 04 Nov 2019 19:03:31 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: ray.ni@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2019 19:03:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,269,1569308400"; d="scan'208";a="403197175" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga006.fm.intel.com with ESMTP; 04 Nov 2019 19:03:30 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 4 Nov 2019 19:03:30 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 4 Nov 2019 19:03:29 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.149]) with mapi id 14.03.0439.000; Tue, 5 Nov 2019 11:03:27 +0800 From: "Ni, Ray" To: "Gao, Zhichao" , =?iso-8859-1?Q?Marvin_H=E4user?= , "devel@edk2.groups.io" CC: "vit9696@protonmail.com" Subject: Re: [PATCH] UefiShellCommandLib: Default to first found UC for unsupported PlatformLang Thread-Topic: [PATCH] UefiShellCommandLib: Default to first found UC for unsupported PlatformLang Thread-Index: AQHVhz8YONZguz4tIkWYLbNNQg/kqqdpA5YQgBL4vjA= Date: Tue, 5 Nov 2019 03:03:27 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C34FB43@SHSMSX104.ccr.corp.intel.com> References: <3CE959C139B4C44DBEA1810E3AA6F9000B85A6F5@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B85A6F5@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am ok to this change. > -----Original Message----- > From: Gao, Zhichao > Sent: Thursday, October 24, 2019 9:25 AM > To: Marvin H=E4user ; devel@edk2.groups.io > Cc: vit9696@protonmail.com; Ni, Ray > Subject: RE: [PATCH] UefiShellCommandLib: Default to first found UC for > unsupported PlatformLang >=20 > Hi Ray, >=20 > This patch would set the default language of shell to the first found lan= guage > instead of ASSERT when the matched language is not found. What do you > think of this change? I don't know the reason of assert. If it is require= d to > ASSERT to show the user the shell language should be matched with the > platform language. Then the patch is inappropriate. If not, the patch is = fine. >=20 > Thanks, > Zhichao >=20 > > -----Original Message----- > > From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] > > Sent: Sunday, October 20, 2019 8:09 PM > > To: devel@edk2.groups.io > > Cc: vit9696@protonmail.com; Ni, Ray ; Gao, Zhichao > > > > Subject: [PATCH] UefiShellCommandLib: Default to first found UC for > > unsupported PlatformLang > > > > From: Marvin Haeuser > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2300 > > > > On some firmwares PlatformLang is set to the local language (e.g. > > ru-RU), however there is no Unicode Collation protocol instance that > supports it. > > As for missing PlatformLang, fall back to the first found instance. > > > > Cc: Ray Ni > > Cc: Zhichao Gao > > Signed-off-by: Marvin Haeuser > > --- > > ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 6 > +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git > > a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > > b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > > index 4c48b65fbc1d..345808a1eac6 100644 > > --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > > +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c > > @@ -107,9 +107,13 @@ CommandInit( > > // // Without clue provided use the first Unicode Collati= on2 > protocol.+ > > // This may happen when PlatformLang is NULL or when no installed > > Unicode+ // Collation2 protocol instance supports PlatformLang. = //- > if > > (PlatformLang =3D=3D NULL) {+ if (gUnicodeCollation =3D=3D NULL) > > { gUnicodeCollation =3D Uc;+ }+ if (PlatformLang =3D= =3D NULL) > > { break; } -- > > 2.23.0.windows.1