[ZCM] [ZC] 2262/ 2 Assign "new convertToUnicode() broken"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2262 Update (Assign) "new convertToUnicode() broken" Status Accepted, Zope/bug critical To followup, visit: http://www.zope.org/Collectors/Zope/2262 ============================================================== = Assign - Entry #2 by ajung on Jan 11, 2007 8:19 am Status: Pending => Accepted Supporters added: andreasjung a) clearly a bug b) you can't create a ZPT instance with a content-type other than text/html or text/xml ________________________________________ = Request - Entry #1 by yuppie on Jan 11, 2007 7:56 am There are two issues in Products.PageTemplates.utils.convertToUnicode: 1.) If charsetFromMetaEquiv(source) returns a value, it is ignored and a TypeError is raised. The sniffing result should be used for decoding instead. 2.) Other content-types than 'text/xml' or 'text/html' always trigger a ValueError. I guess it would be better to try decoding based on preferred_encodings. ==============================================================