A WordPress-centric search engine for devs and theme authors



wp_set_internal_encoding ›

Since3.0.0
Deprecatedn/a
wp_set_internal_encoding ( No parameters )
Access:
  • private
Defined at:
Codex:

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.



Source

function wp_set_internal_encoding() {
	if ( function_exists( 'mb_internal_encoding' ) ) {
		$charset = get_option( 'blog_charset' );
		if ( ! $charset || ! @mb_internal_encoding( $charset ) ) {
			mb_internal_encoding( 'UTF-8' );
		}
	}
}