3 ms·
> No. Ever heard about http://websec.github.io/unicode-security-guide/ http://websec.github.io/unicode-security-guide/ Which part of it is relevant to pathname
by jwilk 10y ago
> No. Ever heard about http://websec.github.io/unicode-security-guide/ http://websec.github.io/unicode-security-guide/
Which part of it is relevant to pathnames?
> To the canonical form of course
Do you mean NFC?
> not the crazy Python 3 or Apple idea of NFD.
In what circumstances does Python 3 normalize pathnames?
> If it's encoded as bytes you get garbage in - garbage out.
What do you mean by "encoded as bytes"?
> http://perl11.org/blog/unicode-identifiers.html http://perl11.org/blog/unicode-identifiers.html
This is about programming language identifies, not about pathnames, which are very different beasts.
- rurban 10y ago> 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.
- jrochkind1 10y ago> 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?
- rurban 10y agoThere can only be one canonical normalization, not two. NFC is the canonical one, NFKC compresses ligatures differently.