{"id":45239,"date":"2015-03-31T07:06:19","date_gmt":"2015-03-31T11:06:19","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=45239"},"modified":"2017-08-16T10:13:15","modified_gmt":"2017-08-16T14:13:15","slug":"joomla-troubleshooter-how-to-deal-with-deprecated-function-iconv_set_encoding-error","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/joomla-troubleshooter-how-to-deal-with-deprecated-function-iconv_set_encoding-error.html","title":{"rendered":"Joomla Troubleshooter. How to deal with &#8220;Deprecated function iconv_set_encoding()&#8221; error"},"content":{"rendered":"<p>\r\n<p>This tutorial will show you how to deal with <strong>&#8216;iconv_set_encoding()&#8217;<\/strong> error during Joomla installation in <strong>php 5.6<\/strong> environment.<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=nj1WjuBz7zk?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla Troubleshooter. How to deal with &#8220;Deprecated function iconv_set_encoding()&#8221; error<\/a><\/p>\r\n<p>The error may look like the following:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1-300x171.png\" alt=\"Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1\" width=\"300\" height=\"171\" class=\"aligncenter size-medium wp-image-45241\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1-300x171.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1-150x85.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_1.png 992w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<pre>Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in public_html\\joomla\\libraries\\joomla\\string\\string.php on line 27\r\n\r\nDeprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in public_html\\joomla\\libraries\\joomla\\string\\string.php on line 28\r\n\r\nDeprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in public_html\\joomla\\libraries\\joomla\\string\\string.php on line 29\r\n<\/pre>\r\n<p>Let&#8217;s see how to deal with this issue.<\/p>\r\n<ol>\r\n<li>\r\n<p>Open the file <strong>string.php<\/strong> in <strong>&#8216;public_html\\joomla\\libraries\\joomla\\string\\&#8217;<\/strong> directory. Go to the line <strong>27<\/strong>.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Now change the lines below:<\/p>\r\n<pre class=\"brush:php\">if (function_exists('iconv'))\r\n{\r\n\/\/ These are settings that can be set inside code\r\niconv_set_encoding(\"internal_encoding\", \"UTF-8\");\r\niconv_set_encoding(\"input_encoding\", \"UTF-8\");\r\niconv_set_encoding(\"output_encoding\", \"UTF-8\");\r\n}<\/pre>\r\n<\/li>\r\n<li>\r\n<p>to the following:<\/p>\r\n<pre class=\"brush:php\">if (function_exists('iconv') &amp;&amp; PHP_VERSION_ID &lt; 50600)\r\n{\r\n\/\/ These are settings that can be set inside code\r\niconv_set_encoding(\"internal_encoding\", \"UTF-8\");\r\niconv_set_encoding(\"input_encoding\", \"UTF-8\");\r\niconv_set_encoding(\"output_encoding\", \"UTF-8\");\r\n}\r\nelseif (PHP_VERSION_ID &gt;= 50600)\r\n{\r\nini_set(\"default_charset\", \"UTF-8\");\r\n}<\/pre>\r\n<\/li>\r\n<\/ol>\r\n<p>This should resolve the problem and let you proceed to the next level during Joomla installation:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2-300x126.png\" alt=\"Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2\" width=\"300\" height=\"126\" class=\"aligncenter size-medium wp-image-45240\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2-300x126.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2-150x63.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/03\/Joomla_Ho_to_deal_with_iconv_set_encoding_error_while_Joomla_installation_in_php_5_6_2.png 990w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=nj1WjuBz7zk?width=1280&amp;height=720\" rel=\"prettyPhoto\">Joomla Troubleshooter. How to deal with &#8220;Deprecated function iconv_set_encoding()&#8221; error<\/a><\/p>\r\n<p><\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/cart.php?addOffer=587\">\r\n<img src=\"\/help\/files\/banners\/inline\/Banner-1-(500-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to deal with &#8216;iconv_set_encoding()&#8217; error during Joomla installation in php 5.6 environment.<\/p>\n","protected":false},"author":37,"featured_media":45242,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[724],"tags":[1893,691,895,1892,483],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/45239"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=45239"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/45239\/revisions"}],"predecessor-version":[{"id":82769,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/45239\/revisions\/82769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/45242"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=45239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=45239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=45239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}