gpt4 book ai didi

eclipse - Git 错误 : Malformed input or input contains unmappable chacraters

转载 作者:太空狗 更新时间:2023-10-29 13:18:06 28 4
gpt4 key购买 nike

我的 Eclipse 工作区有两个项目,一个使用 CVS,另一个使用 Git。在CVS工程中修改文件并保存时,弹窗说

An internal error occurred during: "Computing Git status for repository repo23".
Malformed input or input contains unmappable chacraters: /Users/pb/repo23/对照表/feng11.htm

知道如何解决这个问题吗?

编辑:

eclipse 平台

版本:4.3.1.v20130911-1000构建 ID:M20130911-1000

Eclipse EGit 3.2.0.201312181205-r

最佳答案

您可以在 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)

我对 sun/nio/fs/UnixPath.java 中的错字感到惊讶: 'chacraters' 而不是 'characters'!

this NetBeans issue 中所述(这应该与 Eclipse 上下文相关):

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 the Terminal.app preferences.

  • When the Terminal export LC_CTYPE set to UTF-8 it works fine in terminal as the sun.jnu.encoding is set to the value of LC_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 the LC_CTYPE=UTF-8.

Rather then addding -J-Dsun.jnu.encoding=UTF-8 to netbeans.conf, prepend the export LC_CTYPE=UTF-8 to it.

你可以在你的 eclipse.ini 中设置它(-DLC_CTYPE=UTF-8)。


Alexander Kachkaev提及 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

关于eclipse - Git 错误 : Malformed input or input contains unmappable chacraters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22413421/

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