Twittering an URL that contains arabic characters via intent/tweet


I need to create a tweet vie inten/tweet?url=[…]. In general this is not a problem. But in my special case the url contains parts written in arabic. I can’t influence the urls because they are delivered through the customer. The url to be postet looks like this:

I escape this and in the result the url looks like this:

But this does not work, since Twitter only recognizes as url.

How can this situation be handled?


Since the UTF-8 characters aren’t valid for the URL, you’ll first need to get them into a valid escaped format – before you escape the URL, first escape the characters:

Now that you’ve escaped those characters you can escape the whole URL:

And then attach it to a Tweet Intent URL:

I think this should work.