Markdown and Astro language servers do not start when the project path contains a non-ASCII character or a space

未关闭 适合新手
#2,277 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@RoiSoleil 已经在做这个了。

开始于 2026年11月12日。

  • #2278 来自 @RoiSoleil —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
java, markdown
领域
backend

调研方向

阅读 MarkdownLanguageServer.getInitializationOptions 和 AstroLanguageServer.getInitializationOptions。issue 指出,它们会根据 projectRootUri.getRawPath() 构建工作目录。检查 Paths.get(projectRootUri) 如何生成文件系统路径,并查找覆盖包含空格或非 ASCII 字符路径的测试。两个语言服务器都能使用这些项目路径启动时,任务即完成;issue 没有指定测试文件。

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

描述

When a project's path contains a non-ASCII character or a space, the Markdown language server cannot start. On Windows (Eclipse 4.41, Java 25), opening a Markdown file of a project located in C:\Users\<user>\Desktop\Evénements\<project> logs:

java.io.IOException: Cannot run program "D:\Programs\eclipse\.node\node-v24.22.1-win-x64\node.exe" (in directory "C:\Users\<user>\Desktop\Ev%C3%A9nements\<project>"): CreateProcess error=267, Nom de répertoire non valide
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1112)
	at org.eclipse.lsp4e.server.ProcessStreamConnectionProvider.start(ProcessStreamConnectionProvider.java:58)
	at org.eclipse.wildwebdeveloper.ui.preferences.ProcessStreamConnectionProviderWithPreference.start(ProcessStreamConnectionProviderWithPreference.java:133)
	at org.eclipse.lsp4e.LanguageServerWrapper.lambda$0(LanguageServerWrapper.java:438)

The working directory still contains %C3%A9 instead of é, so it does not exist.

MarkdownLanguageServer.getInitializationOptions and AstroLanguageServer.getInitializationOptions set the working directory with projectRootUri.getRawPath(), which keeps the percent-encoding of the URI (%C3%A9 for é, %20 for a space). Paths.get(projectRootUri) gives the actual file system path.

#1413 (Vue, project name with spaces) looks like the same kind of problem.

主要语言
Java
星标
203
派生
76
平均合并
1 天 5 小时
30 天内合并 PR
30

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

eclipse-wildwebdeveloper/wildwebdeveloper 的其他 Issue

查看 eclipse-wildwebdeveloper/wildwebdeveloper 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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