Find / replace (using a regular expression): (iconv_set_encoding.*?\)) With: (PHP_VERSION_ID < 50600) ? $0 : ini_set('default_charset', 'UTF-8');
You should avoid the ; in the replace string, it is only needed if you search for it beforehand :)