WordPress.org

Make WordPress Core

Ticket #6092: 6092.diff

File 6092.diff, 716 bytes (added by tenpura, 7 years ago)

Use UTF-8 if get_option('blog_charset') is empty.

  • wp-settings.php

     
    355355 * In most cases the default internal encoding is latin1, which is of no use, 
    356356 * since we want to use the mb_ functions for utf-8 strings 
    357357 */ 
    358 if ( function_exists('mb_internal_encoding') ) 
    359         mb_internal_encoding( get_option( 'blog_charset' ) ); 
     358if (function_exists('mb_internal_encoding')) { 
     359        if (get_option('blog_charset')) 
     360                mb_internal_encoding(get_option('blog_charset')); 
     361        else 
     362                mb_internal_encoding('UTF-8'); 
     363} 
    360364 
    361365 
    362  
    363366if ( defined('WP_CACHE') && function_exists('wp_cache_postload') ) 
    364367        wp_cache_postload(); 
    365368