一,php编码转换
1.通过iconv()函数实现编码转换
语法:iconv(string in_charset,string out_charset,string str)
将指定字符串str由in_charset编码格式转换成out_charset编码格式,返回bool值。
2.通过mb_convert_encoding()函数实现编码转换
语法:mb_convert_encoding(string str,string to_encoding[,mixed from_encoding])
将字符串str的编码由from_encoding转换为to_encoding。
二,检测php字符串的编码
通过mb_detect_encoding()函数来检测字符串使用的是何种字符编码。
三,字符编码优先级
由高---