Search Results
Specifies a substitution character when input character encoding is invalid or character code does not exist in output character encoding. Invalid characters may be substituted "none" (no output), string or int value (Unicode character code value). This setting affects mb_convert_encoding (), mb_convert_variables (), mb_output_handler (), mb_scrub (), and mb_send_mail ().
May 7, 2023 · The mb_substitute_character () is an inbuilt function in PHP that sets or retrieves the substitution character used when a multi-byte string cannot be represented in the specified character encoding.
In PHP, we can use the function mb_substitute_character () to get or set the substitution character. This function specifies the substitution character when the input character encoding is not valid or the character code does not exist in the output character encoding.
The mb_substitute_character function sets or returns the substitution character for invalid encodings in multibyte strings. Let's look at its usage with examples.
Execute mb_substitute_character Online. Info and examples on mb_substitute_character PHP Function from Multibyte String - Human Language and Character Encoding Support
Return Values If substitute_character is set, it returns true for success, otherwise returns false. If substitute_character is not set, it returns the current setting.
People also ask
What does MB_substitute_character do?
How do I use substitute_character in Unicode?
What happens if substitute_character is not set?
mb_substitute_character () specifies substitution character when input character encoding is invalid or character code is not exist in output character encoding. Invalid characters may be substituted NULL (no output), string or integer value (Unicode character code value).
