Comments (10)
+1
Tested in 1.9.2 where Grit::Repo#commits had been raising ArgumentError: invalid byte sequence in UTF-8
.
from grit.
Similar error in 1.9.2 (String#getord): http://github.com/github/gollum/issues#issue/17
from grit.
+1 Fixes isuses with gollum.
from grit.
When can we have a release that fixes this?
from grit.
grit 2.2.0 + gollum 1.0.1 have same bug:
ArgumentError - invalid byte sequence in UTF-8:
/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/grit-2.2.0/lib/grit/ruby1.9.rb:3:in `ord'
/opt/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/grit-2.2.0/lib/grit/ruby1.9.rb:3:in `getord'
from grit.
While the topic branch has been applied and the general encoding issue fixed, an additional encoding issue exists when attempting to commit a blob with a UTF-8-encoded name.
index.add "Café", "blah"
index.commit "message", nil, actor, tree
Results in:
Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
grit (2.3.0) lib/grit/index.rb:137:in `%'
grit (2.3.0) lib/grit/index.rb:137:in `block in write_tree'
grit (2.3.0) lib/grit/index.rb:132:in `each'
grit (2.3.0) lib/grit/index.rb:132:in `write_tree'
grit (2.3.0) lib/grit/index.rb:80:in `commit'
I've fixed this in my app by forcing the encoding of my string, beforehand, to ASCII-8BIT
, and monkey-patching Grit::GitRuby::Internal::LooseStorage#get_raw_object
to try content.force_encoding 'UTF-8'
if content.length != size`, but I assume the library-specific fix shouldn't be so 1.9-heavy.
from grit.
FYI, I'v just send a pull request, fixing one of ruby 1.9 encoding problem.
from grit.
For the record, I'm having the same problem as stephencelis. I'm using version 2.4.1 of grit. Is there a solution in the works for this?
from grit.
We are experiencing the same type of problem with Gitlab, and I've a alternative that may help fix this issue, as commented here: https://github.com/gitlabhq/gitlabhq/issues/725
from grit.
Grit is no longer maintained. See #183 and check out libgit2/rugged.
from grit.
Related Issues (20)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grit.