php mb_convert_encoding text encoding conversion function

WBOY
Release: 2016-07-25 08:53:41
Original
931 people have browsed it
  1. $str='Scripting School: http://bbs.it-home.org';

  2. echo mb_convert_encoding($str, "utf-8"); / /Encoding to utf-8

  3. $str='Programmer's Home: http://bbs.it-home.org';

  4. echo mb_convert_encoding($str, "utf-8" , "gbk"); //The original encoding is known to be gbk, converted to utf-8

  5. $str='Programmer's Home: http://bbs.it-home.org' ;

  6. echo mb_convert_encoding($str, "utf-8", "auto"); //Unknown original encoding, after automatic detection by auto, convert the encoding to utf-8
  7. ?>

Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template