[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):
utf8=encodings.search_function('utf8')
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>
<https://codespeak.net/issue/pypy-dev/issue402>
_______________________________________________________
More information about the Pypy-issue
mailing list