Not an answer to your question, but if you don't need to do extensive operations on filesystem level (like searching, sorting...), there is a nice cross-platform workaround for the issue outlined in this SO question: URLEncode()
ing file names.
Hörensägen.txt
gets turned into
H%c3%b6rens%c3%a4gen.txt
which should be safe to use in any filesystem and is able to map any UTF-8 character.
I find this much preferable to trying to "natively" deal with the host OS's capabilities, which is guaranteed to be complicated and error-prone (in addition to operating system differences, I'm sure the various filesystem formats - FAT16, FAT32, NTFS, extFS versions 1/2/3.... bring their own set of rules to be aware of.)