From nobody Wed May 1 19:11:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+49260+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+49260+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=outlook.com Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1571585792482837.7104378673223; Sun, 20 Oct 2019 08:36:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id kid6YY1788612xiW4cvbjOkg; Sun, 20 Oct 2019 08:36:31 -0700 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.92.67.72]) by mx.groups.io with SMTP id smtpd.web11.1554.1571573316579084157 for ; Sun, 20 Oct 2019 05:08:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RdZ904L4m0t3Gg+b4aJmf85pmasH2a7sfeisE/+F9H+X6QqvcX4siyXDEGyRGsN3wzmV+X6V2wjB5xokavEuuMvvjNNyQL7yjUtcmy9N7WNOrRZ7C4cZkdgFm8s6VYD6oQoFgyTHYOsZU6g4+WLqXfkVJZcBzd45RPQL59j5hUBRil7CJ3Z5lxGGN9fl7mrnzDjSfDjJ2WLTjMyCfLNah9EFNhKK4b4x5pd98YtfaVt74ST10ButsaH/xtOgbWYaYjNgb1kMNgbQVXaQlBgmytG2oiZq6ULk5+srRaxhoT7YkD3lR9QpLsz1IkuoJX/DT5oVfooRfh0mG8qOkFa12Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2I4bLr+FWkQVtgEBYUIpF7EaEIH2qhzlWk6uCr3kKY4=; b=CY/kK6yjaIEBXzken6+cQ48bTo58GZHHxDUTQHZbkcKZRIgHw5X2yfvgem/dsluBZeJ2ATBFFZ0NVQZss3GWt8+drW73anI8vdr7fxTksV0ePQFNr4C8zWfoTSYuGzktacBlcbhwRE+5VTWjHjTTNPJORFut+Pf3LalNm2hjuZb/ZHMb5qIhE06hYSKFGeIGlnwiyWpd1NtszYwEonrpvIPd5xAkQpCDMJEiMVZGL5qXzsCGTe4TCmIqRi06alwXA9PvTZe6EGxrYU2xIrM56/J7VjMZkEf61Ye9qaKZLj79wVygF2UAEOU91hD3rSnh1rZzXfeqa/xawsdSVyWtFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none X-Received: from VE1EUR02FT003.eop-EUR02.prod.protection.outlook.com (10.152.12.57) by VE1EUR02HT106.eop-EUR02.prod.protection.outlook.com (10.152.13.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14; Sun, 20 Oct 2019 12:08:34 +0000 X-Received: from DB7PR07MB4917.eurprd07.prod.outlook.com (10.152.12.58) by VE1EUR02FT003.mail.protection.outlook.com (10.152.12.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14 via Frontend Transport; Sun, 20 Oct 2019 12:08:34 +0000 X-Received: from DB7PR07MB4917.eurprd07.prod.outlook.com ([fe80::1b8:f59a:96de:82ef]) by DB7PR07MB4917.eurprd07.prod.outlook.com ([fe80::1b8:f59a:96de:82ef%3]) with mapi id 15.20.2367.021; Sun, 20 Oct 2019 12:08:34 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "devel@edk2.groups.io" CC: "vit9696@protonmail.com" , Ray Ni , Zhichao Gao Subject: [edk2-devel] [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/kqg== Date: Sun, 20 Oct 2019 12:08:34 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR01CA0052.eurprd01.prod.exchangelabs.com (2603:10a6:208:e6::29) To DB7PR07MB4917.eurprd07.prod.outlook.com (2603:10a6:10:5f::30) x-incomingtopheadermarker: OriginalChecksum:D62B0F93B415551E996E04C76E24E797B795D6B56869A6B99CE142B804CC721F;UpperCasedChecksum:A1C96941393AC36572B310F69B1EA95C76BBD7276FC68A889A8A1BCF4438485F;SizeAsReceived:7822;Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [zy0MbALi8fTjBAqfhJnvSnWpwWqDvoIw] x-microsoft-original-message-id: <3ed54f35914a8a178d31b05e68aeee68fe985ffc.1571572996.git.mhaeuser@outlook.de> x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: VE1EUR02HT106: x-ms-exchange-purlcount: 1 x-microsoft-antispam-message-info: u7VpYI3k4CT13EndOcUILm+iQQSI8OBSRLRDOeHsqStUzNFvWT/Y7T4ymEIn3k9cGCimb2d3r+RrF67iAf0I2kzAcX/33ZuH9sOEFQ+uKHXdCRtxNCu/hoDuPGhL/gmrmXogxna3W9CrCNp0/e171aQGceP+gEo7wfIbqsLT2GBH0Hn+i2WBNQI6hYZTRMAXhcMmyhfNXfZ1/IH6zlByo3Wn0VtSFo/BugDXkwxtVGs= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 0d788ae2-3dcb-4f53-8a4b-08d755563ad6 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2019 12:08:34.3632 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT106 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,Marvin.Haeuser@outlook.com X-Gm-Message-State: kPlHWtuEd3Tg5NKE9c1TiLZmx1787277AA= Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571585791; bh=sJ+GuEZ+OqoI2vskqUShKTV+BC9oUFZQx+BcXev2rhg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vkcS/ecJP+AzneZg8KRjawvaZ1n5WkL7/hxGLvOmEU1k6FRto9ntujRNr1HnnVf/3nz t2cFqN5xqUhC1jbz162KDv6jWBzGqX6yxQDTtNfIX+ihmIBVbQzXzyHScdKOr8NcUvdAl 9lN60WRn3+L5HqdPuEDoKEpj3gzNwahwhgA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Zhichao Gao --- ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/S= hellPkg/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( =20 // // Without clue provided use the first Unicode Collation2 protocol. + // This may happen when PlatformLang is NULL or when no installed Un= icode + // Collation2 protocol instance supports PlatformLang. // - if (PlatformLang =3D=3D NULL) { + if (gUnicodeCollation =3D=3D NULL) { gUnicodeCollation =3D Uc; + } + if (PlatformLang =3D=3D NULL) { break; } =20 --=20 2.23.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#49260): https://edk2.groups.io/g/devel/message/49260 Mute This Topic: https://groups.io/mt/35954837/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-