Skip to content

Arabic Text Body issue #84

@YassineBenArbia-1

Description

@YassineBenArbia-1

hello, i am currently facing an issue when trying to send messages in arabic with the message bird api. it works perfectly fine with other languages but not arabic.
here's a code snippet:
`

import messagebird
import arabic_reshaper
def send_msg(receiver, expiration_date):
if receiver == NULL:
pass
else:
expiration_date = expiration_date[::-1]
text = f"عزيزي العميل ، ينتهي اشتراكك في XXX غدًا بتاريخ {expiration_date}، لتجديده ، يرجى الاتصال بنا."
reshaped_text = arabic_reshaper.reshape(text)
rev_text = reshaped_text[::-1]
client = messagebird.Client("XXXXXXXXX")
message = client.message_create('XXXXXTest',
f'{str(receiver)}',
rev_text,
{ 'reference' : 'Foobar' }
)
`
i tried using arabic reshaper module and when i print the "rev_text" in the terminal it works perfectly fine, meaning that it is shown the way it is expected
but when i receive the message on my phone, there are no arabic characters what so ever, as if they were deleted entirely, meaning i only receive the expiration date and the "XXX" and nothing else. please view the image below to understand what i mean.

attatchment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions