by alkonaut · 9y ago · 0 comments
- Windows and unix line breaks in text files
- Windows and unix path separators
- BOM and non-BOM marked files if parsing UTF
- Forbidden filenames such as in this article
By "handling" I mean it should accept or fail nicely on unexpected input - e.g. say that line breaks should be unix style, or paths should be backslashes etc. Very few projects actually do this well. Even fewer will do even more complex things like handling too long paths with nice error messages etc.
git does not support UTF-16LE[0]. The result is that UTF-16LE encoded files will be mangled[1] by the line ending conversion. There is at least one generated Visual Studio file (GlobalSuppressions.cs) that is saved in UTF-16 by default.
[0] https://github.com/libgit2/libgit2/issues/1009
[1] https://github.com/Microsoft/Windows-classic-samples/issues/...
I think "if possible" is (at least still) very rarely the case that it is.
And speaking of UI, that's one major hurdle right there.
And Mac classic linebreaks (\r only), for that matter.