get charset from http response instead of parsing html