Added encoding detector method in views.py (html, xml or json)