- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前正在编写一个 gem,由于某些原因需要包含 WordPress 的完整副本(不完全确定这是否相关)。现在,问题;运行 gem 构建正常,但 gem install 给出此错误消息似乎是针对每个二进制文件(.gif、.png 等),并且在出现一些错误后,进程停止。
unable to convert "\x89" from ASCII-8BIT to UTF-8 xxx/xxx.xx
某些消息的“x89”标识符不同。
这是一个例子
unable to convert "\xF2" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/spinner.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/stars-2x.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/stars.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/w-logo-blue.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/w-logo-white.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/wheel.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/wordpress-logo.png, skipping
unable to convert "\xF7" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/wpspin_light-2x.gif, skipping
unable to convert "\xF5" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/wpspin_light.gif, skipping
unable to convert "\xF6" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/xit-2x.gif, skipping
unable to convert "\xF3" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/xit.gif, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-admin/images/yes.png, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-content/plugins/akismet/_inc/img/logo-full-2x.png, skipping
unable to convert "\xE8" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-content/themes/twentyfifteen/genericons/Genericons.eot, skipping
unable to convert "\xFC" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-content/themes/twentyfifteen/genericons/Genericons.woff, skipping
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-content/themes/twentyfifteen/screenshot.png, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-content/themes/twentyfourteen/genericons/Genericons-Regular.otf, skipping
我在进程停止前得到的最后一行是
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/templates/wordpress/wp-includes/js/mediaelement/bigplay.png, skipping
我在其他地方看到过类似的问题,但在尝试安装时它们都是针对特定 gem 的。我想问的是如何修复我的 gem 以便不产生此错误?
这是我的 gem 规范
require File.expand_path(File.dirname(__FILE__)) + '/lib/gemname.rb'
Gem::Specification.new do |s|
s.name = 'gemname'
s.version = Gemname::VERSION
s.executables << 'gemname'
s.licenses = ['LICENSE']
s.summary = "Short description"
s.description = "Long description"
s.authors = ["Sigurd Berg Svela"]
s.email = 'sigurdbergsvela@gmail.com'
s.files = `git ls-files -- lib/*`.split("\n")
s.homepage = 'https://github.com/sigurdsvela/gemname'
s.required_ruby_version = '>= 2.0.0'
gemRootDir = File.dirname(File.expand_path(__FILE__))
# get an array of submodule dirs by executing 'pwd' inside each submodule
`git submodule --quiet foreach pwd`.split("\n").each do |submodule_path|
# for each submodule, change working directory to that submodule
Dir.chdir(submodule_path) do
# issue git ls-files in submodule's directory
submodule_files = `git ls-files`.split("\n")
# prepend the submodule path to create absolute file paths
submodule_files_fullpaths = submodule_files.map do |filename|
"#{submodule_path}/#{filename}"
end
# remove leading path parts to get paths relative to the gem's root dir
# (this assumes, that the gemspec resides in the gem's root dir)
submodule_files_paths = submodule_files_fullpaths.map do |filename|
filename.gsub "#{gemRootDir}/", ""
end
# add relative paths to gem.files
s.files += submodule_files_paths
end
end
# Hardcode include gitignores submodule
Dir.chdir(Boot.dir + "/templates/gitignores") do
submodule_path = Boot.dir + "/templates/gitignores"
# issue git ls-files in submodule's directory
submodule_files = `git ls-files`.split("\n")
# prepend the submodule path to create absolute file paths
submodule_files_fullpaths = submodule_files.map do |filename|
"#{submodule_path}/#{filename}"
end
# remove leading path parts to get paths relative to the gem's root dir
# (this assumes, that the gemspec resides in the gem's root dir)
submodule_files_paths = submodule_files_fullpaths.map do |filename|
filename.gsub "#{gemRootDir}/", ""
end
# add relative paths to gem.files
s.files += submodule_files_paths
end
end
最佳答案
这似乎是 gem 安装程序的错误。但是“gem install germane --no-document”是一个临时解决方案。
关于ruby - 安装 gem 时无法将 "\x89"从 ASCII-8BIT 转换为 UTF-8 xxx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29899578/
双引号的 ASCII 数字是多少? (") 另外,是否有指向任何地方的列表的链接? 最后,如何进入C族(尤其是C#) 最佳答案 引号的 ASCII 码是 34。 (好吧,严格来说,它不是真正的引号,而
考虑一台计算机,它有一个字节可寻址内存,根据大端方案组织成 32 位字。程序读取在键盘上输入的 ASCII 字符并将它们存储在连续的字节位置,从位置 1000 开始。在输入名称“johnson”后显示
\x20 下的大多数 ASCII 代码似乎完全过时了。他们今天有没有使用?它们是否可以被视为“可供抢夺”,还是最好避免它们? 我需要一个分隔符来将“行”分组在一起,为此目的选择其中一个肯定会很好。 来
非字母数字或标点符号的字符称为不可打印: Codes 20hex to 7Ehex, known as the printable characters 那么为什么是例如005 可表示(并由 club
在我的一次面试中,面试官问我为什么在 ASCII 表中大写字母在小写字母之前,我在 google.com 上搜索但没有找到,谁能给我答案?多谢! 最佳答案 我只是猜测,但我想这是因为最早的字符集根本没
由于编码原因可能会让您感到恐惧(我不好意思说),我需要在单个字符串中存储多个文本项。 我将使用一个字符来分隔它们。 哪个字符最适合用于此目的,即哪个字符最不可能出现在文本中?必须是可打印的,并且可能小
我的代码将一大堆文本数据传递给负责存储这些数据的遗留库。但是,它倾向于删除尾随空格。当我读回数据时,这是一个问题。由于我无法更改遗留代码,因此我考虑用一些不常见的 ASCII 字符替换所有空格。当我读
我正在检查井号 (£) 的 ASCII 值。我找到了多个答案: http://www.ascii-code.com/说 A3 = 163 是井号的 ASCII 值。 http://www.asciit
我们好像只用了'\0'(null),'\a'(bell),'\b'(backspace),'\t'(水平制表符),'\n'(line fee) ,'\r'(回车),'\v'(垂直制表符),'\e'(转
当我查看 rust ASCII operations感觉之间存在一致性问题 is_lowercase/is_uppercase: pub fn is_uppercase(&self) -> bool
我一直假设 ASCII 码的范围是 0 到 255。昨晚我不得不处理一个我认为是下划线但结果是 Chr(8230) 的字符。三个类似下划线的小点。这是在 AutoHotKey 脚本中。问题已解决,但给
也许我在使用 Google 方面做得很糟糕,但这些规范适用于 Bencoding继续引用称为“十进制 ASCII”的东西,这让我认为它与常规 ASCII 不同。有人能解释一下吗? 最佳答案 base明
我正在尝试将小字符串转换为它们各自的 ascii 十进制值。就像将字符串“Ag”转换为“065103”一样。 我尝试使用 integer_variable : Integer := Integer'V
我想使用程序或图形库将图像转换为 ASCII 艺术,但我想指定要使用的调色板(符号)。所以基本上我想要一个图像,它从某个字母 A 呈现为文本,它是完整 ASCII 表的子集,例如 A := {a,b,
是否可以使用 Graphviz 绘制 ASCII 图表? 类似的事情: digraph { this -> is this -> a a -> test } 给出了不想要的结果。 相反,我
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
如何将 Žvaigždės aukštybėj užges 或 äüöÖÜÄ 之类的字符串转换为 Zvaigzdes aukstybej uzges 或 auoOUA,分别使用 Bash? 基本上我只
这个问题在这里已经有了答案: 关闭 10 年前。 Possible Duplicate: How would you convert from ASCII to Hex by character i
我有一个成员搜索功能,您可以在其中提供部分姓名,返回的内容应该是至少具有与该输入匹配的用户名、名字或姓氏之一的所有成员。这里的问题是某些名称具有“奇怪”的字符,例如 Renée 中的 é 并且用户不想
我有文件名“abc张.xlsx”,其中包含某种非 ASCII 字符编码,我想删除所有非 ASCII 字符以将其重命名为“abc.xlsx”。 这是我尝试过的: import os import str
我是一名优秀的程序员,十分优秀!