WordPress开发者和主题制作者的搜索引擎



wp_set_internal_encoding ›

Since3.0.0
已弃用n/a
wp_set_internal_encoding ( 没有参数 )
访问:
  • private
定义在:
文档:

Set internal encoding.

In most cases the default internal encoding is latin1, which is of no use, since we want to use the mb_ functions for utf-8 strings.



源码

function wp_set_internal_encoding() {
	if ( function_exists( 'mb_internal_encoding' ) ) {
		$charset = get_option( 'blog_charset' );
		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
		if ( ! $charset || ! @mb_internal_encoding( $charset ) ) {
			mb_internal_encoding( 'UTF-8' );
		}
	}
}