タグ

ブックマーク / ziade.org (1)

  • sys.setdefaultencoding is evil

    I have recently found some UnicodeDecodeError bugs on some products, that some people couldn't reproduced. The bug was due to a call to a CMF API that was doing a str() over the object, right before using it. This is perfectly fine in that case, because the object is supposed to be a ZODB id, so it has to be full ASCII. So the bug looks like this : >>> id = u'éou' >>> str(id) Traceback (most recen

    Vorspiel
    Vorspiel 2015/06/24
  • 1