Function name: mb_internal_encoding()
Applicable version: PHP 4 >= 4.0.6, PHP 5, PHP 7
Function description: mb_internal_encoding() function is used to set the internal character encoding of the current script.
Usage: mb_internal_encoding(string $encoding = mb_internal_encoding()): bool
parameter:
Return value: Return true if the internal character encoding is successfully set. Return false if invalid character encoding is provided, or character encoding cannot be set.
Example:
Get the current internal character encoding: $currentEncoding = mb_internal_encoding(); echo "The current internal character encoding is: ". $currentEncoding;
Set the internal character encoding to UTF-8: $result = mb_internal_encoding("UTF-8"); if ($result) { echo "Internal character encoding has been successfully set to UTF-8"; } else { echo "Unable to set internal character encoding"; }