LogMANOriginal
-
2019-04-18
- Labels: --> charset
By providing a get_last_retrieve_url_contents_content_type(), the user of simple_html_dom can set the source charset of the document. However, in larger object-oriented projects it is not acceptable to provide such a global function.
Actually, there is no need for such a function! parse_charset() is only called by load(), and thus load() should get another parameter to set the charset of the source document (with default ''). Only if this parameter is empty, parse_charset() should be called, otherwise the parameter is used as _charset.
The get_last_retrieve_url_contents_content_type() should be deprecated and be removed in a future version since I consider this a bad hack.