Hello,
I am reaching out for help with following issue that I am experiencing when publishing both natively or using REST API.

When I post tweet with link to page in arabic script, the retrieved info in link preview seems to be having issue with charset encoding, please see following screenshot:
image

Following call has been used for this example, but it failed also when posted via native web ui:

curl -XPOST \
  --url https://api.twitter.com/1.1/statuses/update.json \
  --header 'authorization: ...' \
  --header 'content-language: ar' \
  --cookie 'lang=ar' \
  -F 'status="https://arabia.eurosport.com/article/%d9%83%d8%b1%d8%a9-%d8%a7%d9%84%d9%82%d8%af%d9%85/None/%d8%a5%d9%84%d8%ba%d8%a7%d8%a1-%d8%a7%d9%84%d9%85%d9%88%d8%b3%d9%85-%d8%b3%d9%8a%d9%83%d9%84%d9%81-%d8%a7%d9%84%d8%a8%d8%b7%d9%88%d9%84%d8%a7%d8%aa-%d8%a7%d9%84%d9%83%d8%a8%d8%b1%d9%89-%d8%a3%d8%b1%d8%a8%d8%b9%d8%a9-%d9%85%d9%84%d9%8a%d8%a7%d8%b1%d8%a7%d8%aa-%d9%8a%d9%88%d8%b1%d9%88"' \
  -F 'lang=ar'

The weird thing is that I have found link preview from same resource arabia eurosport com with correct encoding however. Please see following screenshot:
image

Is there some locale meta (header, parameter) to be specified to ensure correct parsing of link info?
I have tried specifying content-language header and lang param but without any luck.
I was not able to find anything in official api reference.

Thank you for any suggestions!

Regards
Adam N

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.