microsoft / microsoft/vscode-java-dependency

Unmappable characters in filename break project detection

未关闭
#712 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug upstream
主要语言
TypeScript
星标
199
派生
105
平均合并
1 天 22 小时
30 天内合并 PR
27

描述

I'm using a Github Codespace with the default image. It has a UTF-8 locale:

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

In the project there is a file that is using a UTF-8 character in the filename. Until I remove it, the plugin is unable to detect the project. The log file contains the message

java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/codespace/my-project/target/test-classes/data-files/Grundfl��chen.dat

To me this looks like the filename is UTF-8 (the character is an ä) but the scanner does not treat it as UTF-8 but rather ASCII.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从项目检测和扫描器路径处理开始,在 Codespace 中使用包含 ä 等字符的 UTF-8 文件名重现该问题。跟踪文件名的解码过程,直到出现 InvalidPathException;项目能够成功检测且不删除该文件即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, typescript
领域
developer-experience, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
32/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。