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

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

Closed
xslim opened this Issue Sep 19, 2012 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

xslim commented Sep 19, 2012

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>'
Contributor

xslim commented Sep 19, 2012

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

Contributor

xslim commented Sep 19, 2012

Seems tests is failing for Ruby 1.8.7 :(

@xslim xslim closed this in 420b75c Sep 19, 2012

@fabiopelosin fabiopelosin added a commit that referenced this issue Sep 19, 2012

@fabiopelosin fabiopelosin Merge pull request #531 from xslim/master
Forcing UTF-8 encoding on licenses generation. Fixes #530
1549838

@alloy alloy referenced this issue in fabiopelosin/Ikeda Sep 24, 2012

Closed

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

@jzapater jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

@fabiopelosin fabiopelosin Merge pull request #530 from keenlabs/master
Add KeenClient 3.0.0 spec
83298a1

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.

Owner

alloy commented Nov 2, 2013

@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 added a commit that referenced this issue Oct 25, 2014

@xslim xslim Update lib/cocoapods/generator/acknowledgements/markdown.rb
Forcing UTF-8 encoding on licenses generation. Fixes #530
ba44fc7

@xslim xslim added a commit that referenced this issue Oct 25, 2014

@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 added a commit that referenced this issue Oct 25, 2014

@xslim xslim Update CHANGELOG.md
Update CHANGELOG for #530
fa60144

@fabiopelosin fabiopelosin added a commit that referenced this issue Oct 25, 2014

@fabiopelosin fabiopelosin Merge pull request #531 from xslim/master
Forcing UTF-8 encoding on licenses generation. Fixes #530
75c3af3

@mbland mbland added a commit to 18F/knowledge-sharing-toolkit that referenced this issue Mar 3, 2016

@mbland mbland Set LANG=en_US.UTF-8 to fix Jekyll encoding error
The error is analogous to 18F/jekyll_pages_api_search#12 and appears as:

Liquid Exception: incompatible character encodings: US-ASCII and UTF-8 in ...

This fix was suggested by:

CocoaPods/CocoaPods#530 (comment)
15ddd8a

@mbland mbland added a commit to 18F/knowledge-sharing-toolkit that referenced this issue Mar 3, 2016

@mbland mbland Run locale-gen, update-locale in pages Dockerfile
This sets LANG=en_US.UTF-8 to fix the following Jekyll encoding error:

  Liquid Exception: incompatible character encodings: US-ASCII and UTF-8 in ...

The error is analogous to 18F/jekyll_pages_api_search#12, but this fix was
inspired by:

  CocoaPods/CocoaPods#530 (comment)
  moby/moby#2424
927fe50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment