This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Suzumizaki, amaury.forgeotdarc, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2014-02-03.00:59:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The PyInit_NAME symbol is not the only place where NAME is used. The NAME is also present in the PyModuleDef structure. It looks lie Python expects UTF-8 here. You encode it to UTF-8 and use "\xHH\xHH\xHH..." syntax to keep ASCII encoding for the C file? The NAME may also be mentionned in docstrings, C comments, type names, etc.

I don't like the idea of a new encoding just for one very specific function in C. There are already too many encodings in the world :-( The C language supports non-ASCII identifiers, but I don't know how they are encoded in the symbol table. I would prefer to rely on the C compiler if you would like to play in the playground of non-ASCII identifiers.

In Python/dynload_win.c, _PyImport_GetDynLoadWindows() uses GetProcAddressA().

Is it a theorical feature request, or you really have a Python module with a non-ASCII name?

I'm not sure that it's really useful to support non-ASCII module names for C modules, even if I spend many months to support non-ASCII module names for Python modules :-)
Date User Action Args
2014-02-03 00:59:26vstinnersetrecipients: + vstinner, brett.cannon, amaury.forgeotdarc, ncoghlan, Suzumizaki, eric.snow, serhiy.storchaka
2014-02-03 00:59:26vstinnersetmessageid: <>
2014-02-03 00:59:26vstinnerlinkissue20485 messages
2014-02-03 00:59:26vstinnercreate