Message93084
| Author |
lemburg |
| Recipients |
amaury.forgeotdarc, fenner, lemburg, pitrou |
| Date |
2009年09月24日.18:17:58 |
| SpamBayes Score |
5.498749e-09 |
| Marked as misclassified |
No |
| Message-id |
<4ABBB811.2070204@egenix.com> |
| In-reply-to |
<1253814528.52.0.243696782445.issue6988@psf.upfronthosting.co.za> |
| Content |
Amaury Forgeot d'Arc wrote:
>
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
>
> (Presented this way, "my opinion" becomes difficult to stand...
> OTOH the docs say that the module does not support Unicode, so it's not
> strictly a bug)
> http://docs.python.org/library/shlex.html
>
> Yes, shlex could be improved and encode unicode strings to ascii.
I'd suggest to convert Unicode input to a string using an
optional encoding parameter which defaults to 'utf-8' (most
shells nowadays default to UTF-8).
This is only a compromise, though, albeit a practical one.
POSIX has the notion of a portable character set:
http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap06.html#tagtcjh_3
which is pretty much the same as ASCII. Any ASCII compatible
encoding is then allowed via variable length encodings (see
further down on that page). |
|