Set all PHP internals to UTF-8
Category: php

If you have problems with transcoding strings, for example, between ISO-Latin and UTF-8, it can help if you set the internal encoding to UTF-8

ini_set('mbstring.internal_encoding','UTF-8');
ini_set('mbstring.http_input','UTF-8');
ini_set('mbstring.http_output','UTF-8');

Tags: ,

One Response to “Set all PHP internals to UTF-8”

  1. Priestjim says:

    You forgot mb_regex_encoding(‘UTF-8′); ;)

Leave a Comment