utf8_encode() 函数把 iso-8859-1 字符串编码为 utf-8。
utf8_encode(string);
*/
$str="你好,世界!"; //定义字符串
$result=utf8_decode($str); //进行编码转换
echo $result; //输出转换结果
//实例二
/*
utf8_decode() 函数把 utf-8 字符串解码为 iso-8859-1。
该函数把用 utf-8 方式编码的 iso-8859-1 字符串转换成单字节的 iso-8859-1 字符串。
如果成功,该函数将返回解码字符串;否则返回 false。
utf8_decode(string)
*/
$str="hello world!"; //定义字符串
$result=utf8_decode($str); //进行编码转换
echo $result;
$result=utf8_encode($result); //进行编码转换
echo $result; //输出转换结果
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
