Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

External encoding set to UTF-8 on Ruby 1.9 to fix crash caused by non-ascii characters in pod description #148

Merged
merged 1 commit into from Mar 3, 2012

Conversation

Projects
None yet
2 participants
Contributor

darthdeus commented Mar 3, 2012

If I try to run pod list on Ruby 1.9, I'll get a crash with invalid multibyte char (US-ASCII), specifically

/Users/darthdeus/.cocoapods/master/ATMHud/0.0.1/ATMHud.podspec:7: invalid multibyte char (US-ASCII)
/Users/darthdeus/.cocoapods/master/ATMHud/0.0.1/ATMHud.podspec:7: invalid multibyte char (US-ASCII)
/Users/darthdeus/.cocoapods/master/ATMHud/0.0.1/ATMHud.podspec:7: syntax error, unexpected $end, expecting tASSOC
  s.author   = { 'Marcel Müller' => 'pool@atomton.net' }
                            ^
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/specification.rb:5:in `eval'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/specification.rb:5:in `_eval_podspec'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/specification.rb:16:in `from_file'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/specification/set.rb:59:in `specification'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command/list.rb:19:in `block (2 levels) in run'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command/list.rb:17:in `each'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command/list.rb:17:in `block in run'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command/list.rb:16:in `each'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command/list.rb:16:in `run'
/Users/darthdeus/projects/fun/CocoaPods/lib/cocoapods/command.rb:53:in `run'
./bin/pod:13:in `'

Forcing external encoding to UTF-8 fixes the issue, since 1.9 defaults to US-ASCII if nothing is specified.

Owner

alloy commented Mar 3, 2012

Looks good, thanks! You now have push access.

@alloy alloy added a commit that referenced this pull request Mar 3, 2012

@alloy alloy Merge pull request #148 from darthdeus/master
External encoding set to UTF-8 on Ruby 1.9 to fix crash caused by non-ascii characters in pod description
72e9416

@alloy alloy merged commit 72e9416 into CocoaPods:master Mar 3, 2012

@alloy alloy added a commit that referenced this pull request Oct 25, 2014

@alloy alloy Merge pull request #148 from darthdeus/master
External encoding set to UTF-8 on Ruby 1.9 to fix crash caused by non-ascii characters in pod description
9c0b8ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment