Message106143
> The wchar_t strings themselves are built with mbstowcs(),
> the file system encoding is not used.
Oops sorry, you are right, and it's worse :-) sys.argv is decoded using the locale encoding, but subprocess & cie use the file system encoding for the reverse operation. => it doesn't work if both encodings are different (#4388, #8775).
The pseudo-code to create sys.argv on Unix is:
# argv is a bytes list
encoding = locale.getpreferredencoding()
sys.argv = [arg.decode(encoding, 'surrogateescape') for arg in argv] |
|
Date |
User |
Action |
Args |
2010-05-20 12:39:45 | vstinner | set | recipients:
+ vstinner, amaury.forgeotdarc |
2010-05-20 12:39:45 | vstinner | set | messageid: <1274359185.11.0.074282195914.issue8776@psf.upfronthosting.co.za> |
2010-05-20 12:39:43 | vstinner | link | issue8776 messages |
2010-05-20 12:39:43 | vstinner | create | |
|