标签: php mysql utf-8 character-encoding mb-convert-encoding
我正在尝试生成查询字符串。字符显示为不同的查询。
Php版本:7.3.2
功能
$D->query = ''; if ($this->query('x')) { $D->query = mb_convert_encoding($this->query('x'), 'UTF-8'); }
#Синодал的结果:
#%D0%A1%D0%B8%D0%BD%D0%BE%D0%B4%D0%B0%D0%BB
答案 0 :(得分:1)
该字符串为urlencode d,首先需要简单地urldecode,从那里可以进行任何编码更改:
$decoded = urldecode($this->query(“x”)); $D->query = mb_convert_encoding($decoded, “utf-8”);