symfony/symfony — pull request #4214 by fabpot (2012-05-07 12:21:37+00:00)
Title: [DomCrawler] fixed encoding when using addHtmlContent() (fixes #3881)

After looking around, this is clear that loadHtml() resets the encoding set on the DomDocument instance. So, the only workaround that actually works (and which is not an ugly hack) is to use `mb_convert_encoding` when it exists.