This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 loewis
收信人 MrJean1, amaury.forgeotdarc, loewis, mark.dickinson
日期 2008-11-22.17:01:01
SpamBayes Score 3.872571e-09
Marked as misclassified
Message-id <1227373264.1.0.0544518621628.issue4388@psf.upfronthosting.co.za>
In-reply-to
内容
The locale machinery on OSX is flaky. The question is what people really
pass for command line arguments. It would be useful to find out what
happens in these two cases:

1. Somebody runs "a.py ภาษาไทย" in a Terminal.app window. Most likely,
the terminal encoding is applied, which we should assume to be UTF-8
(although it might be different on some systems).

2. Somebody creates a file japanese_コンテンツ in the finder, then uses
shell completion to pass this to a Python script. Here I expect that
UTF-8 is used even if the terminal's encoding is not UTF-8.

I don't know whether it's possible to launch Python scripts from Finder,
for given files, if so, it would also be interesting to find out what
encoding will be used there.

Without actual testing, I would assume that command line arguments are
typically encoded in UTF-8 on OSX. We should use that for argument
processing, regardless of mbstowcs.
历史
日期 用户 动作 参数
2008-11-22 17:01:04loewis修改recipients: + loewis, amaury.forgeotdarc, mark.dickinson, MrJean1
2008-11-22 17:01:04loewis修改messageid: <1227373264.1.0.0544518621628.issue4388@psf.upfronthosting.co.za>
2008-11-22 17:01:02loewis链接issue4388 messages
2008-11-22 17:01:01loewis创建