Vajrasky Kok added the comment:

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!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19920>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to