(Syntax Error) invalid or reserved Unicode code point

I don’t know which ones are invalid, so I don’t really know which ones to drop?
Is there an allow-list of valid ones builtin somewhere?