Skip to content

Commit

Permalink
Specify charset of StringWritable and StringReadable (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalPawlicki authored Apr 1, 2021
1 parent ee3ee5f commit 6bfede6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geny/src/geny/Writable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ object Writable extends LowPriWritable {

s.grouped(8192).foreach(ss => out.write(ss.getBytes(StandardCharsets.UTF_8)))
}
override def httpContentType = Some("text/plain")
override def httpContentType = Some("text/plain; charset=utf-8")
override def contentLength = Some(Internal.encodedLength(s))
}

Expand Down Expand Up @@ -97,7 +97,7 @@ object Readable{
def readBytesThrough[T](f: InputStream => T): T = {
f(new ByteArrayInputStream(s.getBytes(StandardCharsets.UTF_8)))
}
override def httpContentType = Some("text/plain")
override def httpContentType = Some("text/plain; charset=utf-8")
override def contentLength = Some(Internal.encodedLength(s))
}

Expand Down

0 comments on commit 6bfede6

Please sign in to comment.