I have difficult to Mailjet and (UTF-16/UTF-8)

Job ID: 30974441

Budget: €8 – €30 EUR

Hello,

I use mailjet to send SMS however in the French language there are characters such as à, ç, é, è, ê, ù ... etc
And when used on MailjetSMS they are replaced by '.'

I tried to do:
message.encode (encoding = 'UTF-8', errors = 'strict')
And send the messageEncode variable but I still have the same problem.

My code :

url = "https://api.mailjet.com/v4/sms-send"
headers = CaseInsensitiveDict()
headers["Authorization"] = "Bearer API-KEY"
headers["Content-Type"] = "application/json"

messageEncoded = message.encode(encoding='UTF-8',errors='strict')
data = '{"Text":"'+messageEncoded+'", "To":"+'+numero+'", "From":"'+nom+'"}'

resp = requests.post(url, headers=headers, data=data)
error = str(resp.status_code)


On mailjet doc I see this :
https://dev.mailjet.com/sms/guides/encoding/

I need help
Thank you
Related categories: PHP XML Python Software Architecture API