I have this code :
toto = 'récépissé.pdf'.encode('utf-8')
print(toto)
=> b'r\xc3\xa9c\xc3\xa9piss\xc3\xa9.pdf'
Of course it return a byte type, but I still want a string with the content of the encoded result. I want a string like this :
'r\xc3\xa9c\xc3\xa9piss\xc3\xa9.pdf'
If I try to return a string by using a str() or decode(), it revert back to initial value.
PS: the final purpose is to pass string data in header for dropbox api.