On Fri, Sep 14, 2007, "Martin v. L??wis" wrote: >Hagen: >> >> And what if we skillfully conserve unknown bytes in a private use or >> surrogate area and the application author actually knows the encoding >> and wants correctly decoded strings? > > They can easily roundtrip that then to the encoding that it should have: > > good_string = sys.argv[bad_string_index].\ > encode(sys.argv_encoding, "pua-replace").decode(real_encoding)
That doesn't count as "easily" in my book. What about a sys._argv_orig containing bytes objects? -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ The best way to get information on Usenet is not to ask a question, but to post the wrong information. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
