Hello again 😄
After many hours of trying to find the best way to solve this problem, here's my solution. It ensures that Python 2.6 file streams will always encode to bytes before writing to the output stream. This works around Python issue 4947.
You may reproduce the original problem as follows with Python 2.6:
# encoding: utf-8
from invoke import task, run
run('invoke output_strange_stuff', encoding='utf-8')
Feel free to ask any questions and thanks for the amazing tool! 😄
Oh dear, I broken Python 3.x compatibility. I'll look into a better way, bear with me. 😄
Worked around a Python 2.6 bug whereby file streams don't respect enc…
This should be obviated by changes in #350 now. Please comment after the 0.13 release comes out if that doesn't fix things for you. Thanks!