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.

Author vajrasky
Recipients benjamin.peterson, berker.peksag, ezio.melotti, lars.gustaebel, lemburg, pitrou, serhiy.storchaka, vajrasky, vstinner
Date 2014-01-26.15:41:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390750876.59.0.945438410201.issue19920@psf.upfronthosting.co.za>
In-reply-to
Content
I already have a patch addressing your concerns, Serhiy. But before I upload it here, some questions:

1. "Yes, we can add unencodable tarinfo.linkname later. Just add tests for external tar files." You mean, we need to create a tar file containing unencodable tarinfo.linkname dynamically in the test? Wouldn't modifying testtar.tar be easier?

2. "stdout encoding is just sys.stdout.encoding. Be aware that it can be None (if
sys.stdout is StringIO), in that case the encoding/decoding is not needed".

from io import StringIO
import sys

old_stdout = sys.stdout
sys.stdout = mystdout = StringIO()

import locale
print(locale.getpreferredencoding())

sys.stdout = old_stdout

print(mystdout.getvalue())

I always get UTF-8. Is there anything I miss?

Once I get clarity from these questions, I'll upload the patch. Thanks!
History
Date User Action Args
2014-01-26 15:41:16vajraskysetrecipients: + vajrasky, lemburg, lars.gustaebel, pitrou, vstinner, benjamin.peterson, ezio.melotti, berker.peksag, serhiy.storchaka
2014-01-26 15:41:16vajraskysetmessageid: <1390750876.59.0.945438410201.issue19920@psf.upfronthosting.co.za>
2014-01-26 15:41:16vajraskylinkissue19920 messages
2014-01-26 15:41:16vajraskycreate