get charset from meta charset when http header not provided
refactor into instantiable class for better testing, BC