diff options
author | Marvin H?user <mhaeuser@outlook.de> | 2019-11-05 21:50:44 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-11-08 08:29:58 +0800 |
commit | 9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c (patch) | |
tree | b5b360ffd721be7a149ee2b39a51d23d00783ce9 /ShellPkg | |
parent | 0cecb1f99e6c4ba7408272074541bab98c98a116 (diff) | |
download | edk2-9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c.tar.gz edk2-9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c.tar.bz2 edk2-9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c.zip |
ShellPkg/CommandLib: Use first found UC for unsupported PlatformLang
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>
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c index 4c48b65fbc..345808a1ea 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;
}
|