well, that urllib seems could not work fine like content of you print.
>>> html1[:16]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: addinfourl instance has no attribute '__getitem__'
Doesn't metter, it should be study the usage with urllib.
Do you have a reason to use ANSI? It's probably better to use UTF-8 (with
> no BOM).
>
now, html1(ANSI) shown correctlly, html2(UTF-8) not. its not that I don't
use UTF-8.
After base.html saved as UTF-8, the content seems wrong like extra space at
top of page
(or height of text input area at bottom of page).
在 2014年7月11日星期五UTC+8上午12时49分20秒,Steven Kryskalla写道:
>
> >>> import urllib
> >>> html1 = urllib.urlopen("http://1.yunzlog.appspot.com/")
> >>> html2 = urllib.urlopen("http://2.yunzlog.appspot.com/")
> >>> html1[:16]
> '<!DOCTYPE html>\n'
> >>> html2[:16]
> '\xef\xbb\xbf\xef\xbb\xbf<!DOCTYPE '
> >>>
>
> The ANSI version has a Byte Order Mark at the beginning of the file.
>
> http://en.wikipedia.org/wiki/Byte_order_mark
>
> It's nothing to do with jinja2.
>
> Do you have a reason to use ANSI? It's probably better to use UTF-8 (with
> no BOM).
>
> -Steve
>
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.