Is there a specific reason, why characters needs to be whitelisted? Is it in case someone uses strange characters to flood the chat? Otherwise UTF-8 could just be used, but that was just a guess...