Added test for unicode "None".
encode with self.encoding instead of ("utf-8").