最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

encoding - Encode URL for WhatsApp "click to chat" without loosing accented characters

programmeradmin3浏览0评论

I built a form with a textarea to write a message. This form is submitted via Ajax to a PHP script that saves data in database and return an encoded URL to send message via WhatsApp click to chat ( is message's content). I encode URL with urlencode() PHP function but accented characters (and other special characters) are encoded and in the WhatsApp message that reaches the recipient are illegible. If I create the link manually using accented characters, the message is sent correctly. How can I encode the URL without also encoding accented characters but only what is strictly necessary (for example spaces)?

发布评论

评论列表(0)

  1. 暂无评论