From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.11.1572929527162944299 for ; Mon, 04 Nov 2019 20:52:07 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: zhichao.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2019 20:52:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,270,1569308400"; d="scan'208";a="191983461" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 04 Nov 2019 20:52:05 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 4 Nov 2019 20:52:05 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.149]) with mapi id 14.03.0439.000; Tue, 5 Nov 2019 12:52:03 +0800 From: "Gao, Zhichao" To: "Ni, Ray" , =?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/kqqdpA5YQgBL4vjCAABti4A== Date: Tue, 5 Nov 2019 04:52:02 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B86D9AB@SHSMSX101.ccr.corp.intel.com> References: <3CE959C139B4C44DBEA1810E3AA6F9000B85A6F5@SHSMSX101.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C34FB43@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C34FB43@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Then there is no requirement to force ASSERT when the platform Language is = mismatch with the shell language. Reviewed-by: Zhichao Gao > -----Original Message----- > From: Ni, Ray > Sent: Tuesday, November 5, 2019 11:03 AM > To: Gao, Zhichao ; Marvin H=E4user > ; devel@edk2.groups.io > Cc: vit9696@protonmail.com > Subject: RE: [PATCH] UefiShellCommandLib: Default to first found UC for > unsupported PlatformLang >=20 > I am ok to this change. >=20 > > -----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 > > > > Hi Ray, > > > > This patch would set the default language of shell to the first found > > language 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 required 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. > > > > Thanks, > > Zhichao > > > > > -----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 Colla= tion2 > > 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