gpt4 book ai didi

scala - scala中的REPL中文乱码

转载 作者:行者123 更新时间:2023-12-01 09:35:49 24 4
gpt4 key购买 nike

当我在 REPL 中输入中文字符时,只显示问号,如我的第二个屏幕截图所示。我怎样才能解决这个问题?我的 scala 版本是 2.9.0.1 和 OS windows

before input the Chinese: 中国 using 搜狗输入法

after input

Can't display the Chinese word correctly

即使我使用属性 -Dfile.encoding="UTF-8"

启动 REPL

最佳答案

您必须告诉 REPL 您要使用 unicode(或任何编码)。试试

scala -Dfile.encoding="UTF-8"

打开 REPL 时。

关于scala - scala中的REPL中文乱码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8267760/

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