3 ms·
> Filenames should be created as the user typed it - don't change the input before storing it. I wouldn’t go that far. Certainly, I would use some normalizatio
by Someone 3y ago
> Filenames should be created as the user typed it - don't change the input before storing it.
I wouldn’t go that far. Certainly, I would use some normalization algorithm on whatever the user typed, so that there’s no difference between typing a precomposed character (https://en.wikipedia.org/wiki/Precomposed_character https://en.wikipedia.org/wiki/Precomposed_character) and typing a character and a combining character (https://en.wikipedia.org/wiki/Combining_character https://en.wikipedia.org/wiki/Combining_character)
If you don’t do that, the user’s keyboard layout may affect whether they can type a given file name.
Also (nitpicking), if a user types a backspace or control-H, I wouldn’t include a 0x08 in the file name.