Skip to content
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

Set external encoding to UTF-8 to support unicode characters #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Set external encoding to UTF-8 to support unicode characters #35

wants to merge 1 commit into from

Conversation

darthdeus
Copy link

Running scrolls list on my machine (pretty clean install of OS X Lion) dies with

/Users/darthdeus/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/appscrolls 0.8.4/lib/appscrolls/scroll.rb:30:in 
`split': invalid byte sequence in US-ASCII (ArgumentError)`

This can be easily fixed by forcing external encoding to UTF8. It happens only on systems which don't have a proper locale set up (at least that's what I've observed.

$ locale                                                                                                       
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

The bug is also specific to Ruby 1.9, that's why there is a conditional on RUBY_VERSION.

@teaforthecat
Copy link

This works for me. For some reason the twitter_bootstrap scroll explodes with error mentioned above. But this fixes it.

appscrolls 0.9.0

rvm info

ruby-1.9.3-p327:

system:
uname: "Darwin cat.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
system: "osx/10.6/i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"

@teaforthecat
Copy link

oops spoke too soon. This fixed the scrolls list but scrolls new still breaks for me on twitter_bootstrap.
@darthdeus Is it just the twitter_bootsrap scroll that blows up on you too, or are there others?
The issue must also be in thor.
rails/thor#278 seams related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants