Message284718
| Author |
methane |
| Recipients |
Jan Niklas Hasse, abarry, akira, barry, deleted250130, ezio.melotti, lemburg, methane, ncoghlan, r.david.murray, vstinner, yan12125 |
| Date |
2017年01月05日.09:42:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1483609376.86.0.0256194647372.issue28180@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> Anything purely on the Python side of things doesn't work in a traditional C environment - CPython relies on the C lib to do conversions during startup, so we need the C locale to be set correctly.
What I propose is non't use mbstowcs, like __ANDROID__
wchar_t*
Py_DecodeLocale(const char* arg, size_t *size)
{
#if defined(__APPLE__) || defined(__ANDROID__)
wchar_t *wstr;
wstr = _Py_DecodeUTF8_surrogateescape(arg, strlen(arg));
On Linux, command line arguments and filepath is just a byte sequence.
So using UTF-8:surrogateescape from during startup should works fine.
Am I wrong? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年01月05日 09:42:56 | methane | set | recipients:
+ methane, lemburg, barry, ncoghlan, vstinner, ezio.melotti, r.david.murray, akira, deleted250130, yan12125, abarry, Jan Niklas Hasse |
| 2017年01月05日 09:42:56 | methane | set | messageid: <1483609376.86.0.0256194647372.issue28180@psf.upfronthosting.co.za> |
| 2017年01月05日 09:42:56 | methane | link | issue28180 messages |
| 2017年01月05日 09:42:56 | methane | create |
|