Description
string
mb_convert_variables ( string to_encoding, mixed from_encoding, mixed vars)
mb_convert_variables() convert
character encoding of variables vars in
encoding from_encoding to encoding
to_encoding_ It returns character encoding
before conversion for success, FALSE for failure_
mb_convert_variables() 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_
It from_encoding is specified by
array or comma separated string, it tries to detect encoding from
from_coding_ When
encoding is omitted,
detect_order is used_
vars (3rd and larger) is reference to
variable to be converted_ String, Array and Object are accepted_
mb_convert_variables() assumes all parameters
have the same encoding_
Ejemplo 1_ mb_convert_variables() 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);
?> |
|