htmlentities and htmlspecialchars functions!

Write a program last night when the role of misunderstood htmlentities function, resulting in processed string into a garbled and incomprehensible.

htmlentities role is all the character strings are converted to HTML. The data submitted with the function processing, Chinese are also trying to convert into HTML, resulting in the Chinese have become garbled, not storage. Should make use of htmlspecialchars function, which only in a few special characters (such as &,",>,<) converted to HTML format, the other remains unchanged.

Declined comment