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)?
encoding - Encode URL for WhatsApp "click to chat" without loosing accented characters
与本文相关的文章
评论列表(0)
- 暂无评论