[python-win32] Suggestions for a unicode build (original) (raw)

Roger Upole rwupole at msn.com
Fri Jan 4 00:26:17 CET 2008


Tim Roberts wrote:

Roger Upole wrote:

Just supplying the Dll is not sufficient. The .pyd would also have to be linked against unicows.lib, which would mean creating a separate release for win98.

Not so, actually. Microsoft was quite clever with this. Unicows.lib checks on its first invocation to see if it is needed. If it isn't, it rewrites the import table to unhook itself. If it IS needed, it dynamically loads unicows.dll and links it in.

Aha, I wasn't aware that it did any magic at runtime. There's a short section about it in this MSDN article: http://msdn.microsoft.com/msdnmag/issues/01/10/MSLU/ This may well be the best way to go then.

I'm not averse to leaving them in as long as everyone's okay with them still calling the ANSI functions. However, this may still require extra work with Py3k where strings are all Unicode.

All of the profile functions have A and W variants. Why are these different from any other API?

I was most concerned about the effort to convert and maintain a set of functions that were considered obsolete. However, since they are apparently still recommended for use, I'll go ahead and do the work so they can build as Unicode too.

      Roger


More information about the python-win32 mailing list