[PyPy-issue] [issue402] codecs are broken in pypy-c

Amaury Forgeot d Arc pypy-dev-issue at codespeak.net
Fri Mar 18 15:08:14 CET 2011

Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

Since PyPy does not use the streamreader to decode source files, yes, your codec should be changed and implement 
its hacks in the "decode" method, which could look like:

def decode(text, *args):
    decoded, consumed = utf8.decode(text, *args)
    decoded = decoded.replace('myprint ', 'print ')
    return decoded, consumed

The alternative is to fix PyPy of course.

PyPy development tracker <pypy-dev-issue at codespeak.net>

More information about the Pypy-issue mailing list