UTF-8 issues with invalid byte sequences.
Closed this issue · 4 comments
atexit commented
Some authors with umlaut letters in their names can get author details in git blame containing invalid UTF-8, specifically if they're on strange systems like windows.
By doing line.encode! :invalid=>:replace
before trying to match strings in get_blame
, I've personally managed to get around that issue, but that might not be a useful fix for everyone. Anyhow, just a heads up. :)
felipec commented
It works fine on my Linux system. Have you tried to set LC_ALL in Windows?
atexit commented
Right, I was probably being a little unclear. I'm running this under bash on a Mac, but other authors use windows machines where I cannot control the written encoding. This makes your script not crash. :)