[pypy-svn] r61600 - in pypy/trunk/pypy: module/_codecs module/_codecs/test rlib

Maciej Fijalkowski fijall at gmail.com
Sat Feb 7 08:39:40 CET 2009


On Fri, Feb 6, 2009 at 11:37 PM,  <afa at codespeak.net> wrote:
> Author: afa
> Date: Fri Feb  6 23:37:18 2009
> New Revision: 61600
>
> Modified:
>   pypy/trunk/pypy/module/_codecs/__init__.py
>   pypy/trunk/pypy/module/_codecs/interp_codecs.py
>   pypy/trunk/pypy/module/_codecs/test/test_codecs.py
>   pypy/trunk/pypy/rlib/runicode.py
> Log:
> Provide an approximation of the mbcs codec, almost correct
> on a Western installation of Windows (cp1252).
>
> I do have a working complete implementation based on WideCharToMultiByte,
> but it needs a lot of missing functions from rffi:
> get_nonmoving_unicodebuffer, unicode_from_buffer &co
> that I don't want to submit just before the sprint :-)
>
>

nonmoving buffer is just an optimization. (it's even unclear how good
this optimization is).

You can achieve the same by having a list of unichars. Then you just
do u''.join(l).

Feel free to hack on it, it's rather a micro-sprint and we didn't
touch pypy yet at all :)

Cheers,
fijal



More information about the Pypy-commit mailing list