Search code examples
phpunicode

Do I need to set ini_set( 'default_charset', 'UTF-8' );?


My framework for each pages does the follow:

ini_set('mbstring.internal_encoding','UTF-8');
ini_set('mbstring.func_overload',7);
header('Content-Type: text/html; charset=UTF-8');

Do I need to do a ini_set( 'default_charset', 'UTF-8' ); too?


Solution

  • No, you don't have to.

    header('Content-Type: text/html; charset=UTF-8');
    

    sets this for every page already