Update HiiCompareLanguage() function to use GetBestLanguage() API to do RFC4646 language compare.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11319 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2011-02-16 06:02:07 +00:00
parent 8dc8879ab3
commit 7a07cec6c0
1 changed files with 1 additions and 17 deletions

View File

@ -1967,23 +1967,7 @@ HiiCompareLanguage (
IN CHAR8 *Language2
)
{
//
// Porting Guide:
// This library interface is simply obsolete.
// Include the source code to user code.
//
UINTN Index;
for (Index = 0; (Language1[Index] != 0) && (Language2[Index] != 0); Index++) {
if (Language1[Index] != Language2[Index]) {
return FALSE;
}
}
if (((Language1[Index] == 0) && (Language2[Index] == 0)) ||
((Language1[Index] == 0) && (Language2[Index] != ';')) ||
((Language1[Index] == ';') && (Language2[Index] != 0)) ||
((Language1[Index] == ';') && (Language2[Index] != ';'))) {
if (GetBestLanguage (Language1, FALSE, Language2, NULL) != NULL) {
return TRUE;
}