Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Which part of it is relevant to pathnames?

All parts regarding identifiers and names, if you see pathnames as publicly identifiable information. See below.

> In what circumstances does Python 3 normalize pathnames?

None. Python 3 normalizes identifiers to the shorter non-canonical NFKC form. Apple HFS+ normalizes pathnames to the longer D canonical form. Which is faster but takes more space. Usually space is more important than CPU.

> What do you mean by "encoded as bytes"?

What everyone else means on byte encodings: 1-1 mapping of bytes, without any further knowledge of the encoding.

> This is about programming language identifies, not about pathnames, which are very different beasts.

Partially. pathnames can also be argued to be identifiers, similar to domain names, email names, user names, language identifiers. Apple does so. Ask plan9 what they think about pathname semantics. Not everyone is in the garbage in - garbage out camp. Many systems do encode pathnames and have character restrictions. Esp. important is the popular / spoof, which people from the garbage camp don't care about. Julia is recent proponent of the garbage camp, btw.



> to the shorter non-canonical NFKC form

What definition or sense of 'canonical' do you mean? NFKC stands for "Compatibility Decomposition, followed by Canonical Composition", so it's canonical in some sense, right?


There can only be one canonical normalization, not two. NFC is the canonical one, NFKC compresses ligatures differently.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: