amplab / training

Training materials for Strata, AMP Camp, etc
150 stars 121 forks source link

java.nio.charset.MalformedInputException: Input length = 1 #241

Open ZiluTian opened 6 years ago

ZiluTian commented 6 years ago

Hello, On page "Introduction to Scala", command "Source.fromFile(xxx).getLines.toArray" threw an error at me "java.nio.charset.MalformedInputException: Input length = 1". It is an easy fix by setting the encoding to UTF-8. Please consider updating the command on the tutorial page. Thanks!
Source.fromFile(xxx)("UTF-8").getLines.toArray

Thanks, Zilu