When htmlemtities() Is Failing¶
By default, htmlemtities() uses UTF-8. The third argument of that function is the actual encoding, so it is a parameter. When using a non-existing encoding, such as xxx, PHP detects it, and default to UTF-8 (here it works well).
On the other hand, when using a valid encoding, but that is not supported, PHP default to returning an empty string.
See Also¶
utf8, big5 and xxx [Try me]