13: from /usr/local/bin/pod:23:in `<main>'
12: from /usr/local/bin/pod:23:in `load'
11: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/bin/pod:55:in `<top (required)>'
10: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command.rb:52:in `run'
9: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
8: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
7: from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
6: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command.rb:66:in `report_error'
5: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
4: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:226:in `podfile_path'
2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:166:in `installation_root'
1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
I am Facing these errors, don't know why when I run pod update it gives me this error. Any solution??
A: Unicode normalization comes in 4 flavors: C, D, KC, KD. It is C that is relevant for W3C normalization. W3C normalization also treats character references (&#nnnn;) as equivalent to characters.
Each encoding handles the mapping differently, and not all encodings supports all Unicode characters, possibly resulting in issues when converting from one encoding to the other. Only the UTF family supports all Unicode characters.
For example, the text string "a&#xnnnn;" (where nnnn = "0301") is Unicode-normalized since it consists only of ASCII characters, but it is not W3C-normalized, since it contains a representation of a combining acute accent with "a", and in normalization form C, that should have been normalized to U+00E1. [JC]
Q: Why should my program normalize strings? A: Programs should always compare canonical-equivalent Unicode strings as equal (For the details of this requirement, see Section 3.2, Conformance Requirements and Section 3.7, Decomposition, in The Unicode Standard ).
This issues appeared in Cocoapods 1.11.0 and as many already noticed rolling back to 1.10.2 fixes the issue. But the original issue comes from wrong locale set in the terminal. It has to be a UTF-8-based locale.
You can run 'locale' in the terminal to check current locale settings. It should be something like this:
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
If you have ascii-based locales set or "C" (which is also an ascii locale) then run
export LC_ALL=en_US.UTF-8
If you prefer some other locale (not en_US) then run locale -a
to see the list of available options and pick UTF-8 locale you prefer.
Actually CocoaPods warns that UTF-8 locale is required:
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
But before 1.11.0 it was required only in case you use pods which contain non-ascii symbols in their names (Chinese for example) but starting 1.11.0 it become more strict. There is a discussion on Cocoapods GitHub about it: https://github.com/CocoaPods/CocoaPods/issues/10939
I fixed it doing this:
I uninstalled completely cocoapods (my version was 1.11.0)
gem list --local | grep cocoapods
cocoapods-core (1.11.0) cocoapods-deintegrate (1.0.5) cocoapods-downloader (1.5.0) cocoapods-plugins (1.0.0) cocoapods-search (1.0.1) cocoapods-trunk (1.6.0) cocoapods-try (1.2.0)
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-deintegrate
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-trunk
sudo gem uninstall cocoapods-try
Then i installed cocoapods version 1.10.1 (you can try with more versions under 1.11.0 if you need)
sudo gem install cocoapods -v 1.10.1
The answer of Vyacheslav Kormushkin worked for me.
Concretely, what I did was:
open ~/.zshrc
(or .profile if you don't use zsh)export LC_ALL=en_US.UTF-8
, and save the filesource ~/.zshrc
locale
==> The locale will now be fixed
==> You can now safely run pod update
or pod install
First solution is, to remove your current version of the cocoapods and rolling back to 1.10.2
To remove your current version, you could just run:
sudo gem uninstall cocoapods
then you can install the 1.10.2 version of cocoa pods via the following command:
sudo gem install cocoapods -v 1.10.2
The second solution is, to install the cocoapods via Homebrew with the following command:
brew install cocoapods
If you are here because of the failure outputs from Github actions. Try my solution:
add this to the top level of your github workflow yml file:
env:
LANG: en_US.UTF-8
ref: https://docs.github.com/en/actions/learn-github-actions/environment-variables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With