(No version information available, might be only in CVS)
unicode_set_error_mode — Set the error mode for strings conversions
This function sets the error mode for string conversions between different encodings. An error can occur during conversion when an illegal character is encountered or if a character cannot be represented into the new encoding. By default, when an error is encountered, the conversion stops.
The direction sets the conversion direction to which the error mode will apply. This can either be FROM_UNICODE, which will set the error mode for conversions from a unicode string to a binary string or TO_UNICODE, which will set the error mode for conversions from a binary string to a unicode string.
mode determines how the conversion errors are handled. It should be one of the following constants:
|Stop the conversion. This is the default mode.
|Skip the character.
|Substitute the character. The substituting character can be set with unicode_set_subst_char().
|Escape the faulty bytes and represent them in the Unicode character format.
|Escape the faulty bytes and represent them in the ICU character format.
|Escape the faulty bytes and print them in the Java character format.
|Escape the faulty bytes and represent them in decimal format.
|Escape the faulty bytes and represent them in hexadecimal format.
Returns TRUE on success or FALSE on failure.
Emits a E_WARNING level error if the direction or the mode are invalid.
This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.