-
-
Save Yuichiroh/d9c78b117f5ab5ba6565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.CodingErrorAction | |
import scala.io.{Codec, Source} | |
object ReadAndWrite { | |
def main(args: Array[String]): Unit = { | |
implicit val codec = Codec("UTF-8") | |
codec.onMalformedInput(CodingErrorAction.REPLACE) | |
codec.onUnmappableCharacter(CodingErrorAction.REPLACE) | |
Source.fromInputStream(System.in).getLines().foreach(println) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment