Fix behaviour when git output is not utf-8