owncloud/news — pull request #663 by chaotix- (2014-11-22 17:41:13+00:00)
Title: Only use mb_detect_encoding() if no charset is set in HTML

The php function mb_detect_encoding() is not working so well. For examples on articles from spiegel.de it returns an empty string most of the time. As a result all Umlaute are removed from the article.

This patch checks if a charset is supplied inside the document either by a Tag or a Tag. If not of these are found it uses mb_detect_encoding(). If the encoding is still not set at the end it uses UTF-8 which might work as opposed to an empty string which will definately remove all non-ASCII characters.