Windows 10 上的 Clipp,尝试打开具有非 ASCII 名称的文件夹中的文件

发布于 2025-01-14 01:13:54 字数 1077 浏览 2 评论 0原文

我正在 Windows 10 上使用 CLISP 2.49。我想在名称包含非 ASCII 字符的文件夹中打开一个文件(以读取或写入),例如:foo-dir-᾿Аθηναῖοι< /代码>。当我尝试任何文件操作时,出现该文件夹不存在的错误。

这是一个控制台 (cmd.exe) 会话。此会话中显示的操作是对 TRUENAME 的调用,这似乎是一个合适的测试,并且对 OPEN 的调用会触发相同的错误。

C:\Users\dodier\Temp\foo-dir-᾿Αθηναῖοι>C:\maxima-5.45.1\clisp-2.49\clisp.exe -E UTF-8

[1]> (setq ext:*pathname-encoding* 'charset:utf-8)
#<ENCODING CHARSET:UTF-8 :UNIX>
[2]> (truename #p".")

*** - TRUENAME: Directory #P"C:\\Users\\dodier\\Temp\\foo-dir-?????a???\\" does not exist

[4]> (setq ext:*pathname-encoding* 'charset:cp1251)
#<ENCODING CHARSET:CP1251 :UNIX>
[5]> (truename #p".")

*** - TRUENAME: Directory #P"C:\\Users\\dodier\\Temp\\foo-dir-?????a???\\" does not exist

请注意,当前工作目录是名称中包含非 ASCII 字符的文件夹。

请注意,我已使用选项 -E UTF-8 启动了 Clips。我尝试将 EXT:*PATHNAME-ENCODING* 设置为合理的值(UTF-8 和 CP1251),但两者都不起作用。

有什么设置或选项我可以尝试帮助 Clips 吗?

有没有人足够熟悉 CLISP 内部结构,可以说当 CLISP 说文件夹不存在时,低级操作失败了?我想如果我知道的话,我可以尝试绕过它。

I'm working with Clisp 2.49 on Windows 10. I want to open a file (to read or to write) in a folder with a name which contains non-ASCII characters, for example: foo-dir-᾿Αθηναῖοι. When I try any file operation, I get an error that the folder does not exist.

Here is a console (cmd.exe) session. The operations shown in this session are calls to TRUENAME, which seems a suitable test, and calls to OPEN trigger the same error.

C:\Users\dodier\Temp\foo-dir-᾿Αθηναῖοι>C:\maxima-5.45.1\clisp-2.49\clisp.exe -E UTF-8

[1]> (setq ext:*pathname-encoding* 'charset:utf-8)
#<ENCODING CHARSET:UTF-8 :UNIX>
[2]> (truename #p".")

*** - TRUENAME: Directory #P"C:\\Users\\dodier\\Temp\\foo-dir-?????a???\\" does not exist

[4]> (setq ext:*pathname-encoding* 'charset:cp1251)
#<ENCODING CHARSET:CP1251 :UNIX>
[5]> (truename #p".")

*** - TRUENAME: Directory #P"C:\\Users\\dodier\\Temp\\foo-dir-?????a???\\" does not exist

Note that the current working directory is the folder which has non-ASCII characters in its name.

Note that I have launched Clisp with the option -E UTF-8. I tried setting EXT:*PATHNAME-ENCODING* to plausible values (UTF-8 and CP1251) but neither one works.

Is there a setting or option I can try to help Clisp along here?

Is anyone familiar enough with Clisp internals to say what low level operation is failing when Clisp says the folder does not exist? I am thinking that if I knew, I could try to steer around it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

脱离于你 2025-01-21 01:13:54

我在 macOS 上遇到了同样的错误,我发现从 Git 构建当前版本 (https:// gitlab.com/gnu-clisp/clisp)解决了这个问题。我尝试在 Windows 上执行相同的操作,但遇到了编译器错误;显然,一些在其他平台上被 gcc 接受的代码在 Windows 上被 gcc 拒绝。根据记录,我正在使用通过 Cygwin 安装的 gcc 11。

总而言之,我的猜测是观察到的行为是 Clips 中的一个错误,该错误已在最新版本中修复,尽管我无法直接验证这一点。

I was getting the same error on macOS, and I found that building a current version from Git (https://gitlab.com/gnu-clisp/clisp) fixed the problem. I tried to do the same on Windows, but I'm running into compiler errors; apparently some code which is accepted by gcc on other platforms is rejected by gcc on windows. For the record I'm working with gcc 11 installed via Cygwin.

So in summary my guess is that the observed behavior is a bug in Clisp which has been fixed in recent versions, although I'm unable to verify that directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文