gpt4 book ai didi

ios - Unicode 规范化不适用于 ASCII-8BIT

转载 作者:行者123 更新时间:2023-12-05 00:22:28 58 4
gpt4 key购买 nike

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)
我面临这些错误,不知道为什么当我运行 pod update 时它会给我这个错误。有什么解决办法??

最佳答案

这个问题出现在 Cocoapods 1.11.0 中,许多人已经注意到回滚到 1.10.2 解决了这个问题。但最初的问题来自终端中设置的错误区域设置。它必须是基于 UTF-8 的语言环境。
您可以在终端中运行“语言环境”来检查当前的语言环境设置。它应该是这样的:

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=
如果您设置了基于 ascii 的语言环境或“C”(这也是一个 ascii 语言环境),则运行
export LC_ALL=en_US.UTF-8
如果您更喜欢其他语言环境(不是 en_US),请运行 locale -a查看可用选项列表并选择您喜欢的 UTF-8 语言环境。
实际上 CocoaPods 警告说需要 UTF-8 语言环境:
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:

export LANG=en_US.UTF-8
但在 1.11.0 之前,只有在您使用名称中包含非 ascii 符号的 pod(例如中文)时才需要它,但从 1.11.0 开始,它变得更加严格。 Cocoapods GitHub 上有一个关于它的讨论:
https://github.com/CocoaPods/CocoaPods/issues/10939

关于ios - Unicode 规范化不适用于 ASCII-8BIT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68809929/

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com