Message106143
| Author |
vstinner |
| Recipients |
amaury.forgeotdarc, vstinner |
| Date |
2010年05月20日.12:39:43 |
| SpamBayes Score |
1.2565255e-07 |
| Marked as misclassified |
No |
| Message-id |
<1274359185.11.0.074282195914.issue8776@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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] |
|
History
|
|---|
| 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 |
|