Categories

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Featured templates

Joomla Troubleshooter. How to deal with “Deprecated function iconv_set_encoding()” error

Daniel Morales March 31, 2015
Rating: 5.0/5. From 7 votes.
Please wait...

This tutorial will show you how to deal with ‘iconv_set_encoding()’ error during Joomla installation in php 5.6 environment.

Joomla Troubleshooter. How to deal with “Deprecated function iconv_set_encoding()” error

The error may look like the following:

Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in public_html\joomla\libraries\joomla\string\string.php on line 27

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in public_html\joomla\libraries\joomla\string\string.php on line 28

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in public_html\joomla\libraries\joomla\string\string.php on line 29

Let’s see how to deal with this issue.

  1. Open the file string.php in ‘public_html\joomla\libraries\joomla\string\’ directory. Go to the line 27.

  2. Now change the lines below:

    if (function_exists('iconv'))
    {
    // These are settings that can be set inside code
    iconv_set_encoding("internal_encoding", "UTF-8");
    iconv_set_encoding("input_encoding", "UTF-8");
    iconv_set_encoding("output_encoding", "UTF-8");
    }
  3. to the following:

    if (function_exists('iconv') && PHP_VERSION_ID < 50600)
    {
    // These are settings that can be set inside code
    iconv_set_encoding("internal_encoding", "UTF-8");
    iconv_set_encoding("input_encoding", "UTF-8");
    iconv_set_encoding("output_encoding", "UTF-8");
    }
    elseif (PHP_VERSION_ID >= 50600)
    {
    ini_set("default_charset", "UTF-8");
    }

This should resolve the problem and let you proceed to the next level during Joomla installation:

Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2

Feel free to check the detailed video tutorial below:

Joomla Troubleshooter. How to deal with “Deprecated function iconv_set_encoding()” error

Joomla Professional Templates
This entry was posted in Joomla! Tutorials and tagged deprecated, error, function, iconv_set_encoding, joomla. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket