If i had a files inside the environ how i can encode the bytes when i going to save them?<br /><br />On Oct 9, 2010 6:11pm, &quot;P.J. Eby&quot; &lt;pje@telecommunity.com&gt; wrote:<br />&gt; At 09:37 PM 10/9/2010 +0200, And Clover wrote:<br />&gt; <br />&gt; <br />&gt; On 10/06/2010 07:21 PM, P.J. Eby wrote:<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; How would these relate to the Python 3.2 release? Can you make 3.x and<br />&gt; <br />&gt; 2.x versions?<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; Yes, I have separate fixup code paths for 2.x and 3.x. 3.x faces the reverse situation to that previously described, in that os.environ is accurate on Windows but needs reverse-decoding on POSIX. Currently I use utf-8 and surrogateescape, but for Python 3.2 presumably os.environb will be the safer bet.<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; Ok; if you can submit patches against svn://svn.eby-sarna.com/svnroot/wsgiref (for 2.x) and http://svn.python.org/projects/python/branches/py3k/Lib/wsgiref (for 3.x), adding an IISCGIHandler and whatever else, I&#39;ll review them and apply.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Note, by the way, that just because the environment is unicode on 3.x, doesn&#39;t mean it&#39;s WSGI-correct: WSGI requires that unicode environment strings be just bytestrings in disguise.  It&#39;s actually an error if those environment strings contain any character greater than 255!<br />&gt; <br />&gt; <br />&gt; <br />&gt; _______________________________________________<br />&gt; <br />&gt; Web-SIG mailing list<br />&gt; <br />&gt; Web-SIG@python.org<br />&gt; <br />&gt; Web SIG: http://www.python.org/sigs/web-sig<br />&gt; <br />&gt; Unsubscribe: http://mail.python.org/mailman/options/web-sig/hidura%40gmail.com<br />&gt;