当我在Powershell中使用dhall repl时,会遇到很多奇怪的输出/编码问题。我正在为https://github.com/dhall-lang/dhall-haskell/releases窗口使用预编译的二进制文件。
举个例子:
Welcome to the Dhall v1.40.1 REPL! Type :help for more information.
|- let makeSnippet = ./makeSnippet.dhall in makeSnippet "" []
Ôå│ ./makeSnippet.dhall
Ôå│ ./Snippet.dhall
Error: Invalid type for ÔØ░ListÔØ▒
2Ôöé [Text]
C:\xxx\Snippet.dhall:2:10
1Ôöé ./Snippet.dhall
C:\xxx\makeSnippet.dhall:1:15
|- let makeSnippet = ./makeSnippet.dhall in makeSnippet "test" [ "test" ]
Ôå│ ./makeSnippet.dhall
Ôå│ ./Snippet.dhall我在dhall repl和dhall repl --ascii中也有这个问题。在Git Bash中运行Repl时,它可以工作:
(input):2:1:
|
2 | <empty line>
| ^
unexpected end of input
expecting #!, expression, or whitespace
⊢ :let greeting = "hello"
greeting : Text
⊢ ./makeSnippet.dhall
↳ ./makeSnippet.dhall
↳ ./Snippet.dhall
Error: Invalid type for ❰List❱我真的很惊讶地看到,--ascii调用中的错误诊断似乎也使用了unicode字符--这是故意的吗?
到目前为止,我尝试过的(没有成功):
将字体更改为Lucidca
chcp 65001
将字体更改为DejaVu Sans Mono
我真的很想和powershell一起使用dhall。因此,任何解决这个问题的想法都是非常受欢迎的!
事先非常感谢!
朱利安
发布于 2021-09-12 09:28:57
这有助于:
Displaying Unicode in Powershell
我不得不进去
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding =
New-Object System.Text.UTF8Encodinghttps://stackoverflow.com/questions/69150080
复制相似问题