Unicode Error Detector is a product for Plone used to pinpoint errors in your application leading to UnicodeDecodeErrors.

Do not use this product unless you are actively debugging a Unicode Error. Never use this product in production sites.

UnicodeDecodeErrors typically occur when you try to add a Unicode string to a non-ascii string. This product patches StringIO used by page templates to check if the appended string is a Unicode string, and if it is, it replaces the string with an error marker.

As there is some overhead associated with inspecting the strings instead of just appending to the output, this product is meant for debugging purposes only.

Usage

Put the product in your Products directory and restart Zope. Load the template causing the UnicodeDecodeError, and this tool will indicate the location by printing THIS IS WHERE THE ERROR IS in the rendered template.

You can then inspect the template and/or code more closely to figure out where the decode error happens.