From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.754.1571880302765056195 for ; Wed, 23 Oct 2019 18:25:02 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, 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 fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 18:25:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,222,1569308400"; d="scan'208";a="188432179" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2019 18:25:02 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 23 Oct 2019 18:25:01 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 23 Oct 2019 18:25:01 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.165]) with mapi id 14.03.0439.000; Thu, 24 Oct 2019 09:25:00 +0800 From: "Gao, Zhichao" To: =?iso-8859-1?Q?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 Thread-Topic: [PATCH] UefiShellCommandLib: Default to first found UC for unsupported PlatformLang Thread-Index: AQHVhz8YONZguz4tIkWYLbNNQg/kqqdpA5YQ Date: Thu, 24 Oct 2019 01:24:59 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B85A6F5@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: 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 Hi Ray, This patch would set the default language of shell to the first found langu= age instead of ASSERT when the matched language is not found. What do you t= hink of this change? I don't know the reason of assert. If it is required t= o ASSERT to show the user the shell language should be matched with the pla= tform 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 >=20 > From: Marvin Haeuser >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2300 >=20 > 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. >=20 > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Marvin Haeuser > --- > ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > 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 Collation= 2 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