I have a custom website in which I am using wp_insert_post() to manually create posts that have a title which has characters thare are non-English Unicode letters (Arabic to be more specific).

The URL that gets created by wp_insert_post() is something similar to the following:


(note that I have permalinks enabled)

Now, how do I prevent the above link from being saved as show? How do I ensure the Unicode characters are used instead of the %-and-number combination for each letter?


Do not touch that string. URLs must be percent-encoded, and what you see is the slug for the URL. A browser will display the characters just fine, so don’t worry about the database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.