What is the nfd() function really doing?

Das Goravani goravanis at gmail.com
Sat Apr 16 17:06:41 UTC 2022

Thank you Stefan for the very good answer. Very clear now. Makes sense. 

Das Goravani

> On Apr 15, 2022, at 5:08 PM, Stefan Csomor <csomor at advancedconcepts.ch> wrote:
>   Hi Das
>   It’s about Unicode ‘normal forms’ representing certain symbols, eg in
>   German we have umlauts like äöü, when they are composed, eg. the ‘a’
>   and the trema ‘¨’ is 1 single character in Unicode. When they are
>   decomposed it is 2 characters one ‘a’ and one trema ‘¨’ and they are
>   visually composed together so that it looks the same as the composed.
>   The macOS filesystem eg has its filenames always stored decomposed. You
>   have to know this when comparing filenames as strings, because the
>   composed and the decomposed ä are not identical, so you have to compare
>   the strings in the same ‘normal form’.
>   Hope this clears up things a little bit.
>   Best Regards,
>   Stefan
>   Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> im Auftrag
>   von Das Goravani <goravanis at gmail.com>
>   Datum: Freitag, 15. April 2022 um 19:59
>   An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
>   Betreff: What is the nfd() function really doing?
>   What does the nfd() function do in plain common English please?
>   The online help says:
>   Carries out the canonical decomposition of the string and returns the
>   normalized string.
>   What does that mean, I guess I’m locking up on the term "canonical
>   decomposition"
>   I tried looking it up and found that nfd() is a method of decomposing
>   text characters into their base parts but I don’t understand.
>   I’m finding this function used in the IMAP Worker Object Demo by Omnis.
>   They apply nfd() to Mailbox names.
>   I think mailbox names are really set, small, already "decomposed" as
>   far as I can tell. Names like
>   Inbox, Drafts, Trash, Sent items, Spam
>   Couldn’t get much smaller or different, so I don’t understand
>   The term is heavily used in Algebra, and is mathematical
>   Any help appreciated.
>   Das Goravani
>   _____________________________________________________________
>   Manage your list subscriptions at [1]https://lists.omnis-dev.com
>   Start a new message -> [2]mailto:omnisdev-en at lists.omnis-dev.com
> References
>   1. https://lists.omnis-dev.com/
>   2. mailto:omnisdev-en at lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 

More information about the omnisdev-en mailing list