nicolas-grekas/Patchwork-UTF8 — pull request #5 by sammarks (2013-08-03 22:51:25+00:00)
Title: Make sure the HTML-ENTITIES check isn't case sensitive.

I've recently been working with PHPUnit in Laravel on Windows and I ran into an error where I was getting an exception like the following:

```
iconv(): Wrong charset, conversion from `UTF-8' to `HTML-ENTITIES\/\/IGNORE' is not allowed
```

It mentioned the error being on line 102 in this file:

```
/vendor/patchwork/utf8/class/Patchwork/PHP/Shim/Mbstring.php
```

I did some debugging and found out that the `$to_encoding` was "HTML-ENTITIES" instead of "html-entities," causing the error to be thrown. I updated the source to use `strtolower` on the `$to_encoding` and `$from_encoding` conditionals and my tests ran without error.

Stepping up the code frames, I noticed the all-caps "HTML-ENTITIES" was coming from Symfony, so I'm sure I'm not the only one with this problem.