<p>Iconv is a system C library that converts string encodings, and is generally preferable to PHP’s <a href="http://php.net/manual/en/function.mb-convert-encoding.php" rel="nofollow">mb_convert_encoding()</a> because it supports significantly more character encodings. However it’s not guaranteed that it will be available, and if it is, some versions of it have a bug that could put it into an infinite loop in certain circumstances. So Craft’s <a href="http://buildwithcraft.com/classreference/helpers/StringHelper#convertToUTF8-detail" rel="nofollow">StringHelper::convertToUTF8()</a> checks for those things before using it, and logs if it’s not available or a buggy version is installed, before falling back on mb_convert_encoding().</p>

CC BY-SA 3.0
2017-09-11T14:58:06.870Z
I've seen this warning on several sites as well and been asked by clients why the warning is there. So far, it hasn't been an issue but could this answer be extended to indicate what "more character encodings" means? Are there specific languages or situations we should be aware of that may require using iconv?
Ben Parizek
CC BY-SA 3.0
2017-09-11T17:24:04.887Z
@BenParizek Long story, short... I wouldn't worry about it. We've removed that check for Craft 3. It came from HTMLPurifier originally, but we've never ran into an environment where it was an issue and it's caused more support than it ever solved.
Brad Bell
CC BY-SA 3.0
2014-11-11T20:03:11.793Z
Interesting, thanks for the update brandon.  Is it worth the effort for me to try and update it on our servers or is any performance hit not really worth it?
Keith Mancuso
CC BY-SA 3.0
2014-11-11T21:17:48.260Z
@KeithMancuso I don't think it's so much about a performance hit as much as iconv is just more feature rich, so up to you.
Brad Bell
CC BY-SA 3.0
2014-11-11T22:56:46.120Z
@KeithMancuso It’s better because it supports more character encodings. Just updated my answer to clarify that.
Brandon Kelly
CC BY-SA 3.0
2014-11-11T16:55:04.517Z
2014-11-11T22:54:14.833Z
2014-11-11T22:54:14.833Z
Brandon Kelly
<p>I'm curious if others are seeing a similar error in their Craft logs.  It says:</p>

<blockquote>
  <p>Buggy iconv installed.  Will fallback to mbstring.</p>
</blockquote>

<p>It's repeated over and over seemingly with almost every request.</p>

<p>It's a pretty simple server, setup using the default setting from Laravel Forge on Digital Ocean.</p>

<p>Any ideas on how to fix it?</p>

CC BY-SA 3.0
2014-11-11T14:21:52.757Z
I have the same issue, same setup (DO+Laravel Forge).
André Elvan
CC BY-SA 3.0
2016-05-05T17:18:34.453Z
What did you install to fix this?
Sandy D.
<string><conversion><requirements>
Craft.log showing Buggy iconv installed. Will fallback to mbstring
# Craft.log showing Buggy iconv installed. Will fallback to mbstring

(Asked by: username_0 on 2014-11-11)

I'm curious if others are seeing a similar error in their Craft logs. It says:

> Buggy iconv installed. Will fallback to mbstring.

It's repeated over and over seemingly with almost every request.

It's a pretty simple server, setup using the default setting from Laravel Forge on Digital Ocean.

Any ideas on how to fix it?

**Tags:** string, conversion, requirements
> **Comments:**
> **username_1**: I have the same issue, same setup (DO+Laravel Forge).  
> **username_2**: What did you install to fix this?  

---

## 1 answers

### Answer by username_3 on 2014-11-11. Score: 5 | Accepted answer

Iconv is a system C library that converts string encodings, and is generally preferable to PHP’s [mb\_convert\_encoding()](http://php.net/manual/en/function.mb-convert-encoding.php) because it supports significantly more character encodings. However it’s not guaranteed that it will be available, and if it is, some versions of it have a bug that could put it into an infinite loop in certain circumstances. So Craft’s [StringHelper::convertToUTF8()](http://buildwithcraft.com/classreference/helpers/StringHelper#convertToUTF8-detail) checks for those things before using it, and logs if it’s not available or a buggy version is installed, before falling back on mb\_convert\_encoding().

> **Comments:**
> **username_0**: Interesting, thanks for the update brandon.  Is it worth the effort for me to try and update it on our servers or is any performance hit not really worth it?  
> **username_5**: @KeithMancuso I don't think it's so much about a performance hit as much as iconv is just more feature rich, so up to you.  
> **username_3**: @KeithMancuso It’s better because it supports more character encodings. Just updated my answer to clarify that.  
> **username_4**: I've seen this warning on several sites as well and been asked by clients why the warning is there. So far, it hasn't been an issue but could this answer be extended to indicate what "more character encodings" means? Are there specific languages or situations we should be aware of that may require using iconv?  
> **username_5**: @BenParizek Long story, short... I wouldn't worry about it. We've removed that check for Craft 3. It came from HTMLPurifier originally, but we've never ran into an environment where it was an issue and it's caused more support than it ever solved.  

---

