Deprecated iconv_set_encoding

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
jefit
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Mon Apr 28, 2008 5:22 am

Deprecated iconv_set_encoding

Post by jefit » Sat Dec 26, 2015 4:03 am

I have an old 2.5 site
I am seeing the following message above my administrator login page. It also flashes briefly when I browse different pages of the 2.5 website:
Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /home/mysite/public_html/libraries/joomla/string/string.php on line 28

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in /home/mysite/public_html/libraries/joomla/string/string.php on line 29

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in /home/mysite/public_html/libraries/joomla/string/string.php on line 30

It is hard to tell the line numbers but I suspect it is referring to these lines of code in my string.php:
// Same for iconv
if (function_exists('iconv') || ((!strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && dl('iconv.so'))))
{
// 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");
}
I am in the process of updating it to 3.4
Is there anything I can do to the 2.5 code in the meantime?

harperlala
Joomla! Guru
Joomla! Guru
Posts: 697
Joined: Mon Aug 24, 2015 5:55 pm

Re: Deprecated iconv_set_encoding

Post by harperlala » Sat Dec 26, 2015 6:02 am


jefit
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Mon Apr 28, 2008 5:22 am

Re: Deprecated iconv_set_encoding

Post by jefit » Sat Dec 26, 2015 7:54 am

Perfect!
Thank you very much!

deleted user

Re: Deprecated iconv_set_encoding

Post by deleted user » Sun Dec 27, 2015 12:04 am

This exact thing was patched with the 2.5.28 (final 2.5) release. Needing that hack indicates you haven't updated your site to that release.

jefit
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 231
Joined: Mon Apr 28, 2008 5:22 am

Re: Deprecated iconv_set_encoding

Post by jefit » Sun Dec 27, 2015 1:14 am

Yes. You're right.
My admin says "You already have the latest version 2.5.24" so I wasn't updating any more. I'll be glad when I'm on to 3.4 as everything is more automated.
Thanks.


Locked

Return to “General Questions/New to Joomla! 2.5”