Encode unicode kwargs to avoid UnicodeEncodeError
Decode output to avoid UnicodeDecodeError
Merge pull request #15813 from terminalmage/issue13878

Encode/Decode unicode characters in cmd.run states