Description
string
mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding])
mb_convert_encoding() converts
character encoding of string str from
from-encoding to
to-encoding.
str : String to be converted.
from-encoding is specified by character
code name before conversion. it can be array or string - comma
separated enumerated list. If it is not specified, the internal
encoding will be used.
Example 1. mb_convert_encoding() example |
<?php
$str = mb_convert_encoding($str, "SJIS");
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");
$str = mb_convert_encoding($str, "EUC-JP", "auto");
?>
|
|
See also mb_detect_order().