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>
This commit is contained in:
		
				
					committed by
					
						 Liming Gao
						Liming Gao
					
				
			
			
				
	
			
			
			
						parent
						
							0cecb1f99e
						
					
				
				
					commit
					9e9f0be353
				
			| @@ -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; | ||||
|       } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user