I have to encode the Arabic text I want to send via SMS so I'm using
import urllib.parse
sms_to_encode = "نتمنى لك رحلة تعليمية ممتعة مع برامجنا الأونلاين"
sms_body = urllib.parse.quote_plus(sms_to_encode)
These are the results:
%D9%86%D8%AA%D9%85%D9%86%D9%89%20%D9%84%D9%83%20%D8%B1%D8%AD%D9%84%D8%A9%20%D8%AA%D8%B9%D9%84%D9%8A%D9%85%D9%8A%D8%A9%20%D9%85%D9%85%D8%AA%D8%B9%D8%A9%20%D9%85%D8%B9%20%D8%A8%D8%B1%D8%A7%D9%85%D8%AC%D9%86%D8%A7%20%D8%A7%D9%84%D8%A3%D9%88%D9%86%D9%84%D8%A7%D9%8A%D9%86
I can send the characters above. but when I plug English character, for example, I want to add the name of the person who registered, and sometimes the person enter an English Name and the encoding will be:
sms_to_encode = "Ahmed نتمنى لك رحلة تعليمية ممتعة مع برامجنا الأونلاين"
Results:
Ahmed%2C%20%D9%86%D8%AA%D9%85%D9%86%D9%89%20%D9%84%D9%83%20%D8%B1%D8%AD%D9%84%D8%A9%20%D8%AA%D8%B9%D9%84%D9%8A%D9%85%D9%8A%D8%A9%20%D9%85%D9%85%D8%AA%D8%B9%D8%A9%20%D9%85%D8%B9%20%D8%A8%D8%B1%D8%A7%D9%85%D8%AC%D9%86%D8%A7%20%D8%A7%D9%84%D8%A3%D9%88%D9%86%D9%84%D8%A7%D9%8A%D9%86
and now I can't send the characters above via SMS.
Any help.