Removes encode statements, adds test with data from python lib