function strToUtf8($vector) {
$from_chr = mb_detect_encoding ( $vector, array (
'UTF-8',
'ASCII',
'EUC-CN',
'CP936',
'BIG-5',
'GB2312',
'GBK'
) );
if ($from_chr != "UTF-8") {
$vector = mb_convert_encoding ( $vector, 'UTF-8', array (
'UTF-8',
'ASCII',
'EUC-CN',
'CP936',
'BIG-5',
'GB2312',
'GBK'
) );
}
return $vector;
}