Skip to content

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

@ZiluTian

Description

@ZiluTian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions