On Sat, Feb 18, 2023 at 12:31 PM Marvin Häuser <mhaeu...@posteo.de> wrote: > > > > On 17. Feb 2023, at 21:14, Pedro Falcato <pedro.falc...@gmail.com> wrote: > > > > @@ -169,5 +170,20 @@ Ext4StrCmpInsensitive ( > > IN CHAR16 *Str2 > > ) > > { > > + ASSERT (gUnicodeCollationInterface != NULL); > > return gUnicodeCollationInterface->StriColl (gUnicodeCollationInterface, > > Str1, Str2); > > } > > Off-topic (should merge either way), but is there a reason such a function is > not in BaseLib? > @Ard Do you happen to know?
Proper collation (and proper unicode handling in general) is AIUI pretty hard and involves a lot of tables, etc. So it makes total sense to me why one wants to "dynamically link" this in using protocols instead of statically linking it everywhere. Should be noted that EnglishDxe makes a mockery out of unicode collation and does plain ASCII operations only :)) > > /** > > @@ -761,6 +753,19 @@ Ext4Bind ( > > BlockIo = NULL; > > DiskIo = NULL; > > > > + // Note: We initialize collation here since this is called in BDS, when > > we are likely > > + // to have the Unicode Collation protocols available. > > + if (!Ext4IsCollationInitialized ()) { > > Why do we need to expose this? I.e., why can't this be an internal decision > of Ext4InitialiseUnicodeCollation()? > > > + Status = Ext4InitialiseUnicodeCollation (BindingProtocol->ImageHandle); > I did think about that, but then decided against it since I felt that initializing multiple times would make little logical sense. -- Pedro -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#100347): https://edk2.groups.io/g/devel/message/100347 Mute This Topic: https://groups.io/mt/97037199/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-