cleaned up encoding regexes