>>> message = 'test 112 hello: what?!' >>> message = message.encode('iso-8859-15') >>> message b'test 112 hello: what?!'