unicode_set_subst_char
(PHP 6 >= 6.0.0)
unicode_set_subst_char — Set the substitution character for string conversion errors
Описание
When converting a string from or to unicode, an invalid or unconvertible character may be encountered. When the conversion error mode is set to U_CONV_ERROR_SUBST, the character that caused the error is substituted by a character set by this function. The default substitution character is ?.
Параметри
- character
-
The substitution character to use.
Връщани стойности
Връща TRUE при успех или FALSE при неуспех.
Грешки/Изключения
Emits a E_WARNING level error if character is invalid.
Бележки
Тази функция е ЕКСПЕРИМЕНТАЛНА. Поведението на функцията, името й, както и съпътстващата документация, могат да бъдат променени без предупреждение в бъдеща версия на PHP. Тази функция би трябвало да бъде използвана единствено на ваша собствена отговорност.
Вж. също
- unicode_set_error_mode() - Set the error mode for strings conversions
- unicode_get_error_mode() - Get the error mode for strings conversions
- unicode_encode() - Convert a unicode string in any encoding
- unicode_decode() - Convert a binary string into a Unicode string
unicode_set_subst_char
