<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>Python 2.6/Windows: shlex.split() does not support unicode strings. Is this simply a limitation of the current shlex implementation or is this an intentional design decision that reflects the behavior of how the Windows shell supports unicode values?</div>
<div> </div>
<div>Specifically, it doesn't appear that subprocess.Popen() has any restrictions on unicode args, but perhaps I'm missing some edge cases where this may be true?</div>
<div> </div>
<div>If this is simply a limitation of the current shlex implementation, does anyone see any risks to encoding a command string using 'xmlreplace' ( command.encode( 'utf8', 'xmlreplace' ) ) in order to hide unicode chars, splitting the now ASCII string using shlex.split, and then walking the list of strings returned by shlex.split, decoding them back to Unicode ( .decode( 'utf8' ) ) before passing this list to subprocess.Popen() for execution?</div>
<div> </div>
<div>Thanks,</div>
<div>Malcolm</div>
<div> </div></div></body></html>