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
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