Message112767
> I fail to see why subprocess.call(cmd.encode('whatever')) is not a general solution.
Because 'whatever' encoding doesn't exist.
Assume cmd contains Japanese characters and my system is Chinese windows. subprocess.call expect the argument is encoded in mbcs, which is cp950. However, cp950 encoding doesn't contain Japanese characters.
subprocess.call(cmd.encode('cp950')) will fail because cp950 doesn't contain Japanese characters.
subprocess.call(cmd.encode('cp932')) will fail because subprocess.call will decode fail or incorrectly. |
|
Date |
User |
Action |
Args |
2010-08-04 07:11:37 | kcwu | set | recipients:
+ kcwu, terry.reedy, amaury.forgeotdarc, gregcouch, andersjm, ocean-city, mclausch, brotch, xianyiteng, mightyiam |
2010-08-04 07:11:30 | kcwu | set | messageid: <1280905890.73.0.0702096025379.issue1759845@psf.upfronthosting.co.za> |
2010-08-04 07:11:29 | kcwu | link | issue1759845 messages |
2010-08-04 07:11:28 | kcwu | create | |
|