A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-May/157398.html below:

[Python-Dev] RFC: PEP 587 "Python Initialization Configuration": 2nd version

[Python-Dev] RFC: PEP 587 "Python Initialization Configuration": 2nd version [Python-Dev] RFC: PEP 587 "Python Initialization Configuration": 2nd versionSteve Dower steve.dower at python.org
Tue May 14 13:52:15 EDT 2019
On 10May2019 1832, Victor Stinner wrote:
> I studied code of applications embedding Python. Most of them has to
> decode bytes strings to get wchar_t* to set home, argv, program name,
> etc. I'm not sure that they use the "correct" encoding, especially
> since Python 3.7 got UTF-8 Mode (PEP 540) and C locale coercion (PEP
> 538).

It looks like Py_DecodeLocale() is available very early on - why 
wouldn't we recommend using this function? It seems to be nearly a 
drop-in replacement for mbtowcs in the samples, and if memory allocation 
is a big deal perhaps we could just add a version that writes to a buffer?

That would provide a supported workaround for the encoding issues and 
unblock people hitting trouble right now, yes?

Cheers,
Steve
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4