News for hackers. Stuff that matters.
Re:Why to normalize Unicode strings by zokier on Wednesday March 13, 2019 @01:43PM (#19381311)
> In general, NFC is the one to use as a default.

Why nfc instead of nfd?

Re:Why to normalize Unicode strings by jrochkind1 on Wednesday March 13, 2019 @02:10PM (#19381625)
Not really sure why NFC has become the general standard.

UAX#15 notes that:

> The W3C Character Model for the World Wide Web 1.0: Normalization [CharNorm] and other W3C Specifications (such as XML 1.0 5th Edition) recommend using Normalization Form C for all content, because this form avoids potential interoperability problems arising from the use of canonically equivalent, yet different, character sequences in document formats on the Web. See the W3C Character Model for the Word Wide Web: String Matching and Searching [CharMatch] for more background.

One of the W3C documents cited says:

> NFC has the advantage that almost all legacy data (if transcoded trivially, one-to-one, to a Unicode encoding), as well as data created by current software or entered by users on most (but not all) keyboards, is already in this form. NFC also has a slight compactness advantage and is a better match to user expectations in most languages with respect to the relationship between characters and graphemes.

https://www.w3.org/TR/charmod-norm/

Re:Why to normalize Unicode strings by jfk13 on Wednesday March 13, 2019 @02:11PM (#19381638)
To conform with W3C recommendations, for one thing:

"Content authors SHOULD use Unicode Normalization Form C (NFC) wherever possible for content."[1]

It's a SHOULD rather than a MUST. Non-NFC content is not a spec violation, but using NFC is strongly advised.

[1] https://www.w3.org/TR/charmod-norm/#normalizationChoice

Re:Why to normalize Unicode strings by minitech on Wednesday March 13, 2019 @01:53PM (#19381443)
Saves space, is just what people expect, easier to work fast and loose with when you want to do that.
Re:Why to normalize Unicode strings by rurban on Thursday March 14, 2019 @01:35AM (#19386745)
But needs a third more time than NFD. Apple choose the long form NFD in its old filesystem. NFC needs three steps, NFD only the first two. The size rarely matters that much.