error when uploading string with special characters

后端 未结 2 983
后悔当初
后悔当初 2021-01-29 07:35

i am uploading a string which has special characters

Example

$what = Fay King suggests ‘Miss Airheart’ as name for ‘Lady Lindy\'\"
<
相关标签:
2条回答
  • 2021-01-29 08:00

    Please ensure, that the page that uploads the string and the one that displays the string have the same text encoding, e.g. this one:

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    

    In general, each page of your WebApp should have only and only one text encoding set.

    0 讨论(0)
  • 2021-01-29 08:04

    have you tried a simple urlencode()?

    http://php.net/manual/en/function.urlencode.php

    0 讨论(0)
提交回复
热议问题