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_CONVERT_VARIABLES(3) 						 1						   MB_CONVERT_VARIABLES(3)

mb_convert_variables - Convert character code in variable(s)

SYNOPSIS
string mb_convert_variables (string $to_encoding, mixed $from_encoding, mixed &$vars, [mixed &$...]) DESCRIPTION
Converts character encoding of variables $vars in encoding $from_encoding to encoding $to_encoding. mb_convert_variables(3) join strings in Array or Object to detect encoding, since encoding detection tends to fail for short strings. Therefore, it is impossible to mix encoding in single array or object. PARAMETERS
o $to_encoding - The encoding that the string is being converted to. o $from_encoding -$from_encoding is specified as an array or comma separated string, it tries to detect encoding from $from-coding. When $from_encoding is omitted, detect_order is used. o $vars -$vars is the reference to the variable being converted. String, Array and Object are accepted. mb_convert_variables(3) assumes all parameters have the same encoding. o $... - Additional $vars. RETURN VALUES
The character encoding before conversion for success, or FALSE for failure. EXAMPLES
Example #1 mb_convert_variables(3) example <?php /* Convert variables $post1, $post2 to internal encoding */ $interenc = mb_internal_encoding(); $inputenc = mb_convert_variables($interenc, "ASCII,UTF-8,SJIS-win", $post1, $post2); ?> PHP Documentation Group MB_CONVERT_VARIABLES(3)
Man Page