Another approach would be to transform any 'iffy' names to a form that is acceptable.  When writing MemoWiki I discovered that file names have various OS-implied restrictions that conflict, and that in practice the only non-alphanumeric characters allowed are '-' and '_' -- so I used '_' for blank and '-' as an escape character to introduce hex for anything else.