Unicode Error Detector
Unicode Error Detector is a simple product that you can install to pinpoint errors in your application leading to UnicodeDecodeErrors.
Current release
Unicode Error Detector 1.0
Released Jun 30, 2005
Initial public release.
More about this release…
Get
Unicode Error Detector
for
all platforms
(0 kB)
- Product Package
Project Description
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.
Resources
Some useful resources if you're new to Unicode:
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
- Unicode for programmers (Python examples)
Credits
Unicode Error Detector was written by Helge Tesdal from Jarn.
Martin Opstad Reistadbakk from Simula Research Labs helped improve the templates.
Simula Research Labs sponsored the development of this product.
