jesseeichar/scala-io — Issue #52: InputStreamResource seems to ignore Codec
Author: takezoe
Created: 2012-02-18 19:09:41+00:00
State: open

String which read using InputStreamResource as following is broken.

val chars = Path("readme.txt").chars(Codec("Windows-31J"))
// or
val chars = Resource.fromInputStream(
new java.io.FileInputStream("readme.txt")).chars(Codec("Windows-31J"))

I expect it's caused by ignoring Codec in creating java.io.InputStreamReader at InputStreamResouce:
https://github.com/jesseeichar/scala-io/blob/master/core/src/main/scala/scalax/io/managed/InputStreamResource.scala#L36-45