character encoding - PHP how to display text from input tag correctly
371
when i echo something from an input (form in html) to php
the input value in html was:
强化课程
the echo (php) output was:
强化课程
how to make it shows correctly?
I am using Php 5.3.10
Answer
Solution:
The page encoding should be set properly (if not done already) via the response headers:
Answer
Solution:
In your HTML file make sure this meta tag is inside your
<head></head>
tag:Answer
Solution:
make sure you set correct meta in html.
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
set correct locale in php.
setlocale(LC_ALL, "en_US.UTF-8");