scala“错误:解码时出现io错误";“使用 utf-8" [英] scala "error: io error while decoding" "with utf-8"

查看:46
本文介绍了scala“错误:解码时出现io错误";“使用 utf-8"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这件事不断出现我检查了我的所有源文件是否都是 utf8 编码的,并且我在 scalac 和 scala 命令行工具中使用了-encoding UTF8"标志
有任何想法吗?

this thing keeps coming up I checked that all my source files are utf8 encoded, and Im using '-encoding UTF8' flag with both scalac and scala command line tools
any ideas?

谢谢

推荐答案

我在使用 Main.scala 运行 sbt "test" 时遇到了这个问题,原因是它没有以 UTF 格式保存-8.我通过将 Eclipse Main.scala文件/属性/文本文件编码/其他"更改为UTF-8"并保存来修复它.

I encountered this problem running sbt "test" with Main.scala, for the indicated reason that it wasn't saved in UTF-8. I fixed it by changing Eclipse Main.scala "File / Properties / Text file encoding / Other" to "UTF-8" and saving.

这篇关于scala“错误:解码时出现io错误";“使用 utf-8"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆