$city = $this->uri->segment (4);
Var_dump (Json_decode ($city, true));
$city = Iconv ("Utf-8", "Utf-8", $this->uri->segment (4));
$city = UrlDecode ($this->uri->segment (4));
Var_dump ($city);
$city = Iconv ("Iso-8859-1", "GBK", $city);
Echo $city;
echo "
"." 222 ";
Print_r (Iconv_get_encoding ());
The encoding of the page in the current browser is GBK, and the function output is iso-8859-1. The original nothing is converted output is%e5%8c%97%e4%ba%ac
The browser is converted to Unicode for normal display.
It's been a while, thanks first.
Reply to discussion (solution)
??。 with Mb_convert_encoding
??。 with Mb_convert_encoding
Bad to make
Get
Header ("content-type:text/html; Charset=utf-8 ");
Or is this a very handy
No page encoding is specified.
$city = $this->uri->segment (4); This method of value is too stupid, and the name of the city can not be represented by an ID number