Fix encoding errors on display and update with redirected output

I tried https://github.com/gpocentek/python-gitlab/pull/26 and it did not work for me so I fixed it myself.

I use this inside a script for automatically posting bugs to gitlab.