Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Error: incompatible character encodings: US-ASCII and UTF-8 #530

Closed
xslim opened this Issue · 4 comments

3 participants

@xslim

Report

  • What did you do? - pod update

  • What did you expect to happen? - it should update pods

  • What happened instead? - Error

Stack

   CocoaPods : 0.14.0
        Ruby : ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]
    RubyGems : 1.8.24
        Host : Mac OS X 10.8.2 (12C43)
       Xcode : 4.4.1 (4F1003)
Ruby lib dir : /Users/slim/.rvm/rubies/ruby-1.9.3-p194/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 28e853522f8a01f1af5728648dd1a288b0ea4987

Podfile

          xcodeproj 'Events'

platform :ios, :deployment_target => '5.0'

# Core
pod 'UIDeviceAddition'
pod 'Injective'
pod 'RestKit', :podspec => 'https://raw.github.com/RestKit/RestKit/feature/reboot-networking-layer/RestKit.podspec'

# Helpers
pod 'SDWebImage'

# UI
pod 'TKThemeManager', :podspec => 'https://raw.github.com/xslim/TKThemeManager/master/TKThemeManager.podspec'
pod 'MDAboutController'
pod 'UIGlossyButton'
pod 'SVProgressHUD'
pod 'DDPageControl', '0.1'
pod 'JMTabView'

# Social
pod 'Facebook-iOS-SDK', '1.2'
pod 'ShareKit/Facebook'
pod 'ShareKit/Twitter'
pod 'FlurrySDK'

# Testing
pod 'TestFlightSDK'
pod 'DCIntrospect'

post_install do |installer|
  system "sed -i.bak 's#-framework Twitter#-weak_framework Twitter#g' Pods/Pods.xcconfig"
end

Error

incompatible character encodings: US-ASCII and UTF-8
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements/markdown.rb:31:in `block in licenses'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements/markdown.rb:29:in `each'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements/markdown.rb:29:in `licenses'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements/markdown.rb:11:in `save_as'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements.rb:16:in `block in save_as'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements.rb:15:in `each'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/generator/acknowledgements.rb:15:in `save_as'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/installer.rb:127:in `block in install!'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/installer.rb:123:in `each'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/installer.rb:123:in `install!'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/command/install.rb:46:in `run_install_with_update'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/command/update.rb:16:in `run'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/lib/cocoapods/command.rb:76:in `run'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/gems/cocoapods-0.14.0/bin/pod:16:in `<top (required)>'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/bin/pod:23:in `load'
/Users/slim/.rvm/gems/ruby-1.9.3-p194/bin/pod:23:in `<main>'
@xslim

Maybe there should be an option to turn off generator...

@xslim

Seems tests is failing for Ruby 1.8.7 :(

@xslim xslim referenced this issue from a commit in xslim/CocoaPods
@xslim xslim Update lib/cocoapods/generator/acknowledgements/markdown.rb
Forcing UTF-8 encoding on licenses generation in Ruby 1.9 only. Fixes #530
75df0c3
@xslim xslim referenced this issue from a commit in xslim/CocoaPods
@xslim xslim Update CHANGELOG.md
Update CHANGELOG for #530
c9fcab2
@xslim xslim closed this issue from a commit
@xslim xslim Update lib/cocoapods/generator/acknowledgements/markdown.rb
Forcing UTF-8 encoding on licenses generation. Fixes #530
420b75c
@xslim xslim closed this in 420b75c
@alloy alloy referenced this issue in fabiopelosin/Ikeda
Closed

incompatible character encodings: UTF-8 and US-ASCII #4

@fjcaetano

Hey guys, I'm having the same issue when trying to create a podspec:

This is the context for when I try pod spec create REPO_NAME:

Encoding::CompatibilityError - incompatible character encodings: UTF-8 and US-ASCII
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/command/spec.rb:440:in `spec_template'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/command/spec.rb:42:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.3.2/lib/claide/command.rb:206:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/bin/pod:19:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'

I've already tried changing my Podspec encoding but it was no good. I know absolutely nothing of Ruby, but from what I've inferred, it may be some issue on the template used to create the podspec file.

@alloy
Owner

@fjcaetano It works correctly for me. It might be due to the following environment variables, which you should set to utf-8 as well:

$ env
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
@xslim xslim referenced this issue from a commit
@xslim xslim Update lib/cocoapods/generator/acknowledgements/markdown.rb
Forcing UTF-8 encoding on licenses generation. Fixes #530
ba44fc7
@xslim xslim referenced this issue from a commit
@xslim xslim Update lib/cocoapods/generator/acknowledgements/markdown.rb
Forcing UTF-8 encoding on licenses generation in Ruby 1.9 only. Fixes #530
31174a4
@xslim xslim referenced this issue from a commit
@xslim xslim Update CHANGELOG.md
Update CHANGELOG for #530
fa60144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.