[Grok-dev] the fix for grok2html choking on Unicode

Brandon Craig Rhodes brandon at rhodesmill.org
Tue Sep 18 00:40:20 EDT 2007


The attached patch prevents grok2html from dying when presented with
tutorials that include Unicode-encoded, non-ASCII characters.

The problem was that "docutils.core.publish_string()" returns a plain
string, which needs to be decoded back into a Unicode object before
being submitted to the Zope rendering logic.

I have not committed this myself because I'm not sure where to
changelog it; the "CHANGES.txt" that I see in the Grok root directory
seems to only describe changes to the application itself, whereas this
is a change to a support tool that doesn't seem to get distributed
when someone runs "grokproject"; at least, none of *my* Grok projects
seem to have "grok2html" around, so I, as a user, would be confused to
read about it in the CHANGES.txt that comes with Grok! :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: grok2html-utf8-fix.patch
Type: text/x-diff
Size: 414 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20070918/464c932c/grok2html-utf8-fix.bin
-------------- next part --------------

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list