From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=pNMjJYqp; spf=pass (domain: outlook.com, ip: 40.92.67.72, mailfrom: marvin.haeuser@outlook.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2I4bLr+FWkQVtgEBYUIpF7EaEIH2qhzlWk6uCr3kKY4=; b=pNMjJYqpOns5h8s9ublY7SmxXqcT7CW3yD0dOV2advYFdD664iFUIsPnLcYdAgTnXu7ZydGapP+9ASaMD9Bd/Xuh2kqczKnG57Q1sYTLsoQafyWNmJUAdWPTLpNX8+JjB7ZInv7yaGWhGXaQCeHdTNDszWu8FwBCYDmAlBEH2+Ziao15wHZ8mSK7/0HddRB2Ag7R2HLy/PSKd9NjE8XAcIduazWCoK6XY8jPlUF1oP7VeQWj2gKdjdj+90HVaZTzsW2Jbyrk1cz4ABxVKIFQNLGc1PkA8/kj39Jdvuh2goIVRLF2uzLWyd76nAnklfUg3hODHq4bvL4X5ZBxQ8oxxA== 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 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 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: [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-mailer: git-send-email 2.23.0.windows.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: BCL:0; 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 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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/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( =0D //=0D // Without clue provided use the first Unicode Collation2 protocol.= =0D + // This may happen when PlatformLang is NULL or when no installed Un= icode=0D + // Collation2 protocol instance supports PlatformLang.=0D //=0D - if (PlatformLang =3D=3D NULL) {=0D + if (gUnicodeCollation =3D=3D NULL) {=0D gUnicodeCollation =3D Uc;=0D + }=0D + if (PlatformLang =3D=3D NULL) {=0D break;=0D }=0D =0D --=20 2.23.0.windows.1