These patches allow execution of commands containing characters outside ASCII, as well as receiving command results containing such characters.
They assume the local encoding is UTF-8.
Handle UTF-8 in templates
This is required to run commands containing non-ASCII characters, e.g.:
ansible localhost -m shell -a 'echo ą'
Enable UTF-8 commands via the raw module
Paramiko does not allow Unicode strings as parameters, so encode
the command to UTF-8.
ansible localhost -m raw -a 'echo ą'
(also tested on local and ssh transports without problems)
Fix UTF-8 output when using executable inventory files
The 'hostname' variable is then unicode, which breaks interpolating
stdout etc. contents into the output strings (they are bytes and cannot
be converted to Unicode using ASCII codec)
merged in, thanks! I had fixed templates previously but was pretty sure I didn't hit everything.