如果*blog\\u charset*不是utf8,则以下函数将检查选项,然后返回原始字符串。这样做的目的是什么?
function sc_check_invalid_utf8( $string, $strip = false ) {
$string = (string) $string;
if ( 0 === strlen( $string ) ) {
return \'\';
}
// Store the site charset as a static to avoid multiple calls to get_option()
static $is_utf8;
if ( !isset( $is_utf8 ) ) {
$is_utf8 = in_array( get_option( \'blog_charset\' ), array( \'utf8\', \'utf-8\', \'UTF8\', \'UTF-8\' ) );
}
if ( !$is_utf8 ) {
return $string;
}
......
return \'\';
}