Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mb_substitute_character(3) [php man page]

MB_SUBSTITUTE_CHARACTER(3)						 1						MB_SUBSTITUTE_CHARACTER(3)

mb_substitute_character - Set/Get substitution character

SYNOPSIS
mixed mb_substitute_character ([mixed $substrchar = mb_substitute_character()]) DESCRIPTION
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 NULL (no output), string or integer value (Unicode character code value). This setting affects mb_convert_encoding(3), mb_convert_variables(3), mb_output_handler(3), and mb_send_mail(3). PARAMETERS
o $substrchar - Specify the Unicode value as an integer, or as one of the following strings: o "none": no output o "long": Output character code value (Example: U+3000, JIS+7E7E) o "entity": Output character entity (Example: ) RETURN VALUES
If $substchar is set, it returns TRUE for success, otherwise returns FALSE. If $substchar is not set, it returns the current setting. EXAMPLES
Example #1 mb_substitute_character(3) example <?php /* Set with Unicode U+3013 (GETA MARK) */ mb_substitute_character(0x3013); /* Set hex format */ mb_substitute_character("long"); /* Display current setting */ echo mb_substitute_character(); ?> PHP Documentation Group MB_SUBSTITUTE_CHARACTER(3)

Check Out this Related Man Page

MB_DETECT_ENCODING(3)							 1						     MB_DETECT_ENCODING(3)

mb_detect_encoding - Detect character encoding

SYNOPSIS
string mb_detect_encoding (string $str, [mixed $encoding_list = mb_detect_order()], [bool $strict = false]) DESCRIPTION
Detects character encoding in string$str. PARAMETERS
o $str - The string being detected. o $encoding_list -$encoding_list is list of character encoding. Encoding order may be specified by array or comma separated list string. If $encoding_list is omitted, detect_order is used. o $strict -$strict specifies whether to use the strict encoding detection or not. Default is FALSE. RETURN VALUES
The detected character encoding or FALSE if the encoding cannot be detected from the given string. EXAMPLES
Example #1 mb_detect_encoding(3) example <?php /* Detect character encoding with current detect_order */ echo mb_detect_encoding($str); /* "auto" is expanded according to mbstring.language */ echo mb_detect_encoding($str, "auto"); /* Specify encoding_list character encoding by comma separated list */ echo mb_detect_encoding($str, "JIS, eucjp-win, sjis-win"); /* Use array to specify encoding_list */ $ary[] = "ASCII"; $ary[] = "JIS"; $ary[] = "EUC-JP"; echo mb_detect_encoding($str, $ary); ?> SEE ALSO
mb_detect_order(3). PHP Documentation Group MB_DETECT_ENCODING(3)
Man Page