public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ShellPkg/CommandLib: Use first found UC for unsupported PlatformLang
@ 2019-11-05 13:50 Marvin Häuser
  0 siblings, 0 replies; only message in thread
From: Marvin Häuser @ 2019-11-05 13:50 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: Ray Ni, Zhichao Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2300

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 <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
---
 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 Collation2 protocol.
+      // This may happen when PlatformLang is NULL or when no installed Unicode
+      // Collation2 protocol instance supports PlatformLang.
       //
-      if (PlatformLang == NULL) {
+      if (gUnicodeCollation == NULL) {
         gUnicodeCollation = Uc;
+      }
+      if (PlatformLang == NULL) {
         break;
       }
 
-- 
2.23.0.windows.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-05 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-05 13:50 [PATCH] ShellPkg/CommandLib: Use first found UC for unsupported PlatformLang Marvin Häuser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox