python - Binary Data To Unicode -


among encodings available here http://docs.python.org/library/codecs.html 1 one should use decoding binary data unicode without becoming corrupted when encode string?

i've used raw_unicode_data , doesn't work.

example: upload picture in post (but not file attachment). django converts post data unicode using utf-8. when converting unicode string (again using utf-8), data becomes corrupted. used raw_unicode_data , same happened (though few bytes time). encoding should use decode , encode steps don't corrupt data.

"binary data" not text, therefore converting unicode meaningless. if there text embedded in binary data extract first , decode using encoding given in specification data format.


Comments

Popular posts from this blog

Javascript line number mapping -

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -