# HG changeset patch # User Atul Varma # Date 1262529379 28800 # Node ID 197980874dd4360e2abf5a9f2b63abe19e445301 # Parent 35a52998884fe604c824988757c731b4ebfcf325 more warning feedback diff -r 35a52998884f -r 197980874dd4 publish_edition.py --- a/publish_edition.py Sun Jan 03 06:33:50 2010 -0800 +++ b/publish_edition.py Sun Jan 03 06:36:19 2010 -0800 @@ -77,7 +77,11 @@ for key in obj: obj[key] = normalize(obj[key]) elif isinstance(obj, str): - obj = obj.decode('utf-8', 'ignore') + try: + obj = obj.decode('utf-8') + except UnicodeDecodeError, e: + logging.warn('error decoding "%s" (%s).' % (repr(obj), e)) + obj = obj.decode('utf-8', 'ignore') return obj def filter_articles(names, articles, issues,