Stefan Krah added the comment:

STINNER Victor <rep...@bugs.python.org> wrote:
> "So it should happen somewhere in PyUnicode_DecodeLocaleAndSize(). Perhaps we 
> can create _PyUnicode_DecodeLocaleAndSize() which would take an LC_CTYPE 
> parameter?"
> 
> For this issue, it means that Python localeconv() will have to change the 
> LC_CTYPE locale many time, for each monetary and each number value. I prefer 
> your patch :-)

Windows and OS X have mbstowcs_l(), which takes a locale arg. Linux doesn't
(as far as I can see).  I agree this solution is ugly, but it probably won't
have an impact on benchmarks (naively assuming that setlocale() is fast).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7442>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to