Htmlspecialchars ($ value) causes loss of Chinese characters

Source: Internet
Author: User
Htmlspecialchars ($ value) causes loss of Chinese characters. I downloaded a set of source code using GB2312 page encoding. Both ckeditor and background management are called to filter out HTML dangerous characters using htmlspecialchars ($ value. The problem is that I don't know how it works. after ht htmlspecialchars ($ value), Chinese characters are lost.
I downloaded a set of source code using GB2312 page encoding.
Both ckeditor and background management are called to filter out HTML dangerous characters using htmlspecialchars ($ value.
The problem is that I don't know why. after htmlspecialchars ($ value) is used to process Chinese characters, it is empty?
Later, I checked the information and said that we would like to call it like this:
Htmlspecialchars ($ value, ENT_NOQUOTES, "gb2312 ")


The problem is: I want to change it like this, not a lot. besides, do ckeditor developers not know the existence of this problem?
I am eager for a simple solution. it is best not to change the source code. there is a global setting or environment setting. please help me. thank you!
------ Solution --------------------
Easyphp5.4.0RC4
Is php 5.4 stupid?
I am still using php5.3.6.

If php5.4 is used, report an error to the php bug website.
------ Solution --------------------
Is a version issue. PHP 5.4.0RC4 VC9 should be a test version. There are still many bugs...

Just change EasyPHP 5.3/EasyPHP 5.2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.