[Python-Dev] Support for "wide" Unicode characters
Martin von Loewis
Mon, 2 Jul 2001 09:25:18 +0200 (MEST)
> > > The problem I have with this PEP is that it is a compile time option
> > > which makes it hard to work with both 32 bit and 16 bit strings in
> > > one program.
> > Can you elaborate why you think this is a problem?
> A common role for Python is to act as glue between various modules. If
> Paul produces some interesting code that depends on 32 bit strings and I
> want to use that in conjunction with some Win32 specific or COM dependent
> code that wants 16 bit strings then it may not be possible or may require
> difficult workaronds.
Neither nor. All it will require is you to recompile your Python
installation for to use wide Unicode.
On Win32 APIs, this will mean that you cannot directly interpret
PyUnicode object representations as WCHAR_T pointers. This is no
problem, as you can transparently copy unicode objects into wchar_t
strings; it's a matter of coming up with a good C API for doing so