python proxy: Avoid utf-8 related crash. Thanks, Antoine Beaupré