-
Notifications
You must be signed in to change notification settings - Fork 533
Crash if log contains foreign characters(?) #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can confirm this issue, with version 1.2.5, ruby 1.9.3 and the error message "invalid byte squence in UTF-8" A possible, imperfect workaround would be to replace in lib/git/lib.rb, line 672.. def command_lines(cmd, opts = [], chdir = true, redirect = '')
command(cmd, opts, chdir).split("\n")
end ...with... def command_lines(cmd, opts = [], chdir = true, redirect = '')
line = command(cmd, opts, chdir)
if !line.valid_encoding?
line = line.unpack('C*').pack('U*')
end
line.split("\n")
end |
+1 Having the same issue The solution proposed by @ut works. |
+1 too, this works fine for me. |
Thanks for the feedback, I made a pull request out of this workaround. If someone wants to use the gem with this fix right now, just use my fork |
Seems abandoned 🗑 |
Looking at the queue of the waiting PR, that's a pity. |
Myself at @perlun are in the process of resurrecting the project. I don't want this issue to get lost so I'm re-openong. We've not discussed priorities yet, however internationalization is likely to be high. |
It seems that this issue has been solved in the meantime. I succesfully checked it with the example provided by @fwal |
That's awesome @ut, then I'll close this for real 🎉 |
Hi!
I'm running version 1.2.5 of the gem and 1.9.2 (p290) of ruby.
The following code crashes if the log contains a foreign character in the git log:
Stack trace:
Any ideas?
The text was updated successfully, but these errors were encountered: