how to detect the character encoding in a web page ?

Chris Angelico rosuav at gmail.com
Sun Dec 23 20:23:31 EST 2012


On Mon, Dec 24, 2012 at 11:34 AM, iMath <redstone-cold at 163.com> wrote:
> how to detect the character encoding  in a web page ?
> such as this page
>
> http://python.org/

You read part-way into the page, where you find this:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

That tells you that the character set is UTF-8.

ChrisA



More information about the Python-list mailing list