Git错误:格式错误的输入或输入包含不可映射的chacraters [英] Git error: Malformed input or input contains unmappable chacraters
问题描述
存储库repo23的Git状态。
格式不正确的输入或输入包含不可映射的chacraters:/ Users / pb / repo23 /对照表/feng11.htm
任何想法如何解决这个问题?
编辑:
Eclipse Platform
版本:4.3.1.v20130911-1000
构建ID:M20130911-1000
Eclipse EGit 3.2.0.201312181205- r
您可以在此问题:
java.nio .file.InvalidPathException:格式错误的输入或输入包含不可映射的chacraters:/Users/jettykoo/Desktop/WeTeam/Git/WSS/MaryKay/Doc/01/.DS_Store
at sun.nio.fs.UnixPath.encode(UnixPath .java:147)
at sun.nio.fs.UnixPath。< init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
在java.io.File.toPath(File.java:2186)
在org.ec lipse.jgit.util.FileUtil.isFile(FileUtil.java:126)
在org.eclipse.jgit.util.FileUtil.canExecute(FileUtil.java:131)
我对 sun / nio / fs / UnixPath.java :'chacraters'而不是'
如此NetBeans问题(它应该在Eclipse环境中相关):
它是一个 JDK问题 ,还部分还有Apple问题(
LC_CTYPE
默认情况下不设置。
终端中的行为取决于Terminal.app
首选项。
- 当终端导出
LC_CTYPE
设置为UTF-在
。sun.jnu.encoding
中设置为$ code> LC_CTYPE
- 当它没有设置它不工作。
设置
sun.jnu.encoding
的问题是它可能由JDK覆盖,所以导出LC_CTYPE = UTF-8
更安全。
而不是添加
-J-Dsun.jnu.encoding = UTF-8
到netbeans.conf
,前面输出LC_CTYPE = UTF-8
。
有什么帮助我在
eclipse.ini
中添加两行。
-DLC_CTYPE = UTF-8
-Dfile.encoding = UTF-8
团队命令停止发生错误
My Eclipse workspace has two projects, one using CVS, the other Git. When modifying a file in the CVS project and save, a pop-up window appear saying
An internal error occurred during: "Computing Git status for repository repo23".
Malformed input or input contains unmappable chacraters: /Users/pb/repo23/对照表/feng11.htm
Any idea how to fix this?
EDIT:
Eclipse Platform
Version: 4.3.1.v20130911-1000 Build id: M20130911-1000
Eclipse EGit 3.2.0.201312181205-r
You can see the exact call stack in this issue:
java.nio.file.InvalidPathException: Malformed input or input contains unmappable chacraters: /Users/jettykoo/Desktop/WeTeam/Git/WSS/MaryKay/Doc/01/.DS_Store
at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at java.io.File.toPath(File.java:2186)
at org.eclipse.jgit.util.FileUtil.isFile(FileUtil.java:126)
at org.eclipse.jgit.util.FileUtil.canExecute(FileUtil.java:131)
I was surprised by the typo in sun/nio/fs/UnixPath.java : 'chacraters' instead of 'characters'!
As mentioned in this NetBeans issue (which should be relevant in an Eclipse context):
it's a JDK issue and also partially also Apple issue (the
LC_CTYPE
is not set by default).
The behaviour in terminal depends on theTerminal.app
preferences.
- When the Terminal export
LC_CTYPE
set toUTF-8
it works fine in terminal as thesun.jnu.encoding
is set to the value ofLC_CTYPE
.- When it's not set it does not work.
The problem with setting the
sun.jnu.encoding
is that it may be overwritten by the JDK, so it's safer to export theLC_CTYPE=UTF-8
.Rather then addding
-J-Dsun.jnu.encoding=UTF-8
tonetbeans.conf
, prepend the exportLC_CTYPE=UTF-8
to it.
You could set this in your eclipse.ini (-DLC_CTYPE=UTF-8
).
Alexander Kachkaev mentions in the comments:
What helped me was adding two lines to
eclipse.ini
.
-DLC_CTYPE=UTF-8
-Dfile.encoding=UTF-8
Team commands stopped giving errors
这篇关于Git错误:格式错误的输入或输入包含不可映射的chacraters的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!