util/Util.class.php
/**
     * Converts a string to UTF-8 encoding.
     *
     * @param  string $string
     * @return string
     */
Converts a string to UTF-8 encoding.
Converts a string to UTF - 8 encoding .
public static function convertToUtf8($string) {
        if (!self::isUtf8($string)) {
            $string = self::convertEncoding($string, 'gbk', 'utf-8');
        }
        return $string;
    }
public static function convertToUtf8 ( $ string ) { if ( ! self :: isUtf8 ( $ string ) ) { $ string = self :: convertEncoding ( $ string , 'gbk' , 'utf-8' ) ; } return $ string ; }
Converts a string to UTF-8 encoding.
Converts a string to UTF - 8 encoding .