|
@@ -162,6 +162,12 @@ InitializeUnicodeCollationSupportWithConfig (
|
|
|
/**
|
|
|
Initialize Unicode Collation support.
|
|
|
|
|
|
+ This function searches Initialized Unicode Collation support based on PCDs:
|
|
|
+ PcdUnicodeCollation2Support and PcdUnicodeCollationSupport.
|
|
|
+ It first tries to locate Unicode Collation 2 protocol and matches it with current
|
|
|
+ platform language code. If for any reason the first attempt fails, it then tries to
|
|
|
+ use Unicode Collation Protocol.
|
|
|
+
|
|
|
@param AgentHandle The handle used to open Unicode Collation (2) protocol.
|
|
|
|
|
|
@retval EFI_SUCCESS The Unicode Collation (2) protocol has been successfully located.
|
|
@@ -177,10 +183,18 @@ InitializeUnicodeCollationSupport (
|
|
|
EFI_STATUS Status;
|
|
|
|
|
|
Status = EFI_UNSUPPORTED;
|
|
|
+
|
|
|
+ //
|
|
|
+ // First try to use RFC 3066 Unicode Collation 2 Protocol.
|
|
|
+ //
|
|
|
if (FeaturePcdGet (PcdUnicodeCollation2Support)) {
|
|
|
Status = InitializeUnicodeCollationSupportWithConfig (AgentHandle, &mRfc3066Lang);
|
|
|
}
|
|
|
|
|
|
+ //
|
|
|
+ // If the attempt to use Unicode Collation 2 Protocol fails, then we fall back
|
|
|
+ // on the ISO 639-2 Unicode Collation Protocol.
|
|
|
+ //
|
|
|
if (FeaturePcdGet (PcdUnicodeCollationSupport) && EFI_ERROR (Status)) {
|
|
|
Status = InitializeUnicodeCollationSupportWithConfig (AgentHandle, &mIso639Lang);
|
|
|
}
|