On 2/1/2021 5:16 PM, Christian Heimes wrote:
On 01/02/2021 17.39, M.-A. Lemburg wrote:
Can you explain where wchar_t* type is appropriate and how two
conversions is a performance bottleneck?

If an extension has a wchar_t* string, it should be easy
to convert this in to a Python bytes object for use in Python.

How much software actually uses wchar_t these days and interfaces with
Python? Do you have examples for software that uses wchar_t and would
benefit from wchar_t support in Python?

I did a quick search for wcslen in all shared libraries and binaries on
my system....

Yeah, you searched the wrong kind of system ;)

Pick up a Windows machine, cross-platform code that originated on Windows, anything that interoperates with Java or .NET as well, or uses wxWidgets.

I'm not defending the choice of wchar_t over UTF-8 (but I can: most of these systems chose Unicode before UTF-8 was invented and never took the backwards-incompatible change because they were so popular), but if we want to pragmatically weigh the needs of our users above our desire for purity, then we should try and support both equally wherever possible.

Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/GYUWANE7IMPU45A257UYQD4ZGUDE6QUX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to