[Grok-dev] Can't print browser.content of pages using unicode chars.
battlefox at gmail.com
Thu Sep 10 03:12:19 EDT 2009
Leonardo Rochael Almeida wrote:
> This is not a grok bug, but a long standing bug in the doctest
> infrastructure of Python itself. See:
> On Tue, Sep 8, 2009 at 11:23, grokomobil<battlefox at gmail.com> wrote:
>> To test my grok project, I use the zope.testbrowser module. Everything
>> fine as long as I do not try to print the browser.content of a page that
>> uses utf-8 charset.
>> What I did:
>> 1. Added the following Meta-Tag to the headline of my Template-pt:
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'
>> 2. Added the following line to the top of my Python-file:
>> # coding=utf-8
>> 3. Set the language of my console (LANG etc.. to "to de_DE_UTF8")
>> 4. Added the following to my test.txt:
>> print browser.contents
>> When I run the test with -t test.txt, it will give me a
>> Several attempts to convert the value of browser.contents with
>> (encode('utf-8')/decode('utf-8') failed.
>> Does anyone have an idea how to print browser.contents containing
>> View this message in context:
>> Sent from the Grok mailing list archive at Nabble.com.
>> Grok-dev mailing list
>> Grok-dev at zope.org
> Grok-dev mailing list
> Grok-dev at zope.org
I never did that patching. I know that I can do that with patch -p0
filetopatch patchfile but i get errors then because of missing files. I
tried to correct them in the patchfile to my existing doctest.py in my lib
folder but it does not work, either.
Is there really no chance to test a grok-site that cointains utf-8 or any
other charset than ASCII?
View this message in context: http://www.nabble.com/Can%27t-print-browser.content-of-pages-using-unicode-chars.-tp25342633p25378440.html
Sent from the Grok mailing list archive at Nabble.com.
More information about the Grok-dev