Title: deprecated: iconv_set_encoding()
Last modified: July 11, 2017

---

# deprecated: iconv_set_encoding()

 *  Resolved [WP Fortune](https://wordpress.org/support/users/bpluijms/)
 * (@bpluijms)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/deprecated-iconv_set_encoding/)
 * Hi,
    I got the following error on our website:
 * Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated
   in /wp-content/plugins/mailplus-forms/Zend/Validate/Hostname.php on line 553
 * Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated
   in /wp-content/plugins/mailplus-forms/Zend/Validate/Hostname.php on line 649
 * I found the following solution which seems to be working:
    Replace line 553 with:
 *     ```
       if (function_exists('iconv') && PHP_VERSION_ID < 50600)
       {
           // These are settings that can be set inside code
           iconv_set_encoding("internal_encoding", "UTF-8");
       } 
       elseif (PHP_VERSION_ID >= 50600) 
       {
           ini_set("default_charset", "UTF-8");
       }
       ```
   
 * Replace line 649 with:
 *     ```
       if (function_exists('iconv') && PHP_VERSION_ID < 50600)
       {
           // These are settings that can be set inside code
           iconv_set_encoding("internal_encoding",  $origenc);
       } 
       elseif (PHP_VERSION_ID >= 50600) 
       {
           ini_set("default_charset",  $origenc);
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [Spotler](https://wordpress.org/support/users/mailplus/)
 * (@mailplus)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/deprecated-iconv_set_encoding/#post-9454223)
 * Hi Bart,
 * Thanks for the patch. We’re currently working on a new version with this fixed.
   We hope to have this finished somewhere next week.

Viewing 1 replies (of 1 total)

The topic ‘deprecated: iconv_set_encoding()’ is closed to new replies.

 * ![](https://ps.w.org/mailplus-forms/assets/icon.svg?rev=2655132)
 * [Spotler Mail+ Forms](https://wordpress.org/plugins/mailplus-forms/)
 * [Support Threads](https://wordpress.org/support/plugin/mailplus-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/mailplus-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailplus-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailplus-forms/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Spotler](https://wordpress.org/support/users/mailplus/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/deprecated-iconv_set_encoding/#post-9454223)
 * Status: resolved