Filenames with Accents (2011)
nedbatchelder.com
Filenames with Accents (2011)
1–10 of 19 posts
Re: Filenames with Accents (2011)
#2So if you have four possible normalizations: NFD, NFC, NFKD, NFKC and your string has N ambiguous codepoints, the number of possible strings you need to try is N^4.
Re: Filenames with Accents (2011)
#3Re: Filenames with Accents (2011)
#4You should normalize names on write, on read is very hard to fix. You can have a perfectly valid, denormalized strings representing codepoints with different normalizations. So if you have four possible normalizations: NFD, NFC, NFKD, NFKC and your string has N ambiguous codepoints, the number of possible strings you need to try is N^4.
Re: Filenames with Accents (2011)
#5Side note - after all these years I still don't feel comfortable with using special characters (like ą, ż, ź) and spaces in filenames in Windows. DOS times sit deeply in my soul and It just doesn't feel right.
I know zsh handles auto-complete well but I can `y-a-w` out of my `nvim` `:terminal` a lot easier.
Re: Filenames with Accents (2011)
#6Side note - after all these years I still don't feel comfortable with using special characters (like ą, ż, ź) and spaces in filenames in Windows. DOS times sit deeply in my soul and It just doesn't feel right.
This is amusing but my filesystem has no spaces in it. It's still a pain in the ass from the command line to handle spaces and instead of `-print0` and all that shit I just ban spaces from my filesystem. `-` and `_` are sufficient as spacers. I know zsh handles auto-complete well but I can `y-a-w` out of my `nvim` `:terminal` a lot easier.
Re: Filenames with Accents (2011)
#7Earlier quoted context omitted.
This is amusing but my filesystem has no spaces in it. It's still a pain in the ass from the command line to handle spaces and instead of `-print0` and all that shit I just ban spaces from my filesystem. `-` and `_` are sufficient as spacers. I know zsh handles auto-complete well but I can `y-a-w` out of my `nvim` `:terminal` a lot easier.
I like this approach. How do you enforce your ban? Is there a mount(8) option for that? Or do you simply avoid these filenames "by hand"? What happens if you untar an archive and it contains filenames with spaces?
Re: Filenames with Accents (2011)
#8Side note - after all these years I still don't feel comfortable with using special characters (like ą, ż, ź) and spaces in filenames in Windows. DOS times sit deeply in my soul and It just doesn't feel right.
Re: Filenames with Accents (2011)
#9You should normalize names on write, on read is very hard to fix. You can have a perfectly valid, denormalized strings representing codepoints with different normalizations. So if you have four possible normalizations: NFD, NFC, NFKD, NFKC and your string has N ambiguous codepoints, the number of possible strings you need to try is N^4.
seems like the only way to really achieve that is to bake it into the api for storing/naming files of the respective operating system
Re: Filenames with Accents (2011)
#10Side note - after all these years I still don't feel comfortable with using special characters (like ą, ż, ź) and spaces in filenames in Windows. DOS times sit deeply in my soul and It just doesn't feel right.