On Sun, Jan 05, 2014 at 11:02:34AM -0500, eryksun wrote:

> Danny walked you through the XML. Note that he didn't decode the
> response. It includes an encoding on the first line:
> 
>     <?xml version="1.0" encoding="ISO-8859-1" ?>

That surprises me. I thought XML was only valid in UTF-8? Or maybe that 
was wishful thinking.

>         tree = ET.fromstring(response.read())

In other words, leave it to ElementTree to manage the decoding and 
encoding itself. Nice -- I like that solution.



-- 
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to