Safe cross-platform function to get normalized path
问题 I'd like to have a standard function that will convert relative paths into absolute ones, and if possible I'd like to make it as cross-platform as possible (so I'd like to avoid calling external library functions). This is intended so it's possible to prevent path exploitations. I am aware that such a function wouldn't be able to detect symbolic links, but I'm ok with that for my application. I could roll my own code, but there might be some problems with e.g. how a platform handles encoding