# HG changeset patch # User Tomas Zeman # Date 1462458367 -7200 # Node ID 141e76d946e3bb7826ff4d16799523bd38cf57d0 # Parent b25c02bd6b11725d375bde671ade83f93802c225 CouchStream: process entity as UTF-8 diff -r b25c02bd6b11 -r 141e76d946e3 src/main/scala/CouchStream.scala --- a/src/main/scala/CouchStream.scala Thu Nov 19 19:08:18 2015 +0100 +++ b/src/main/scala/CouchStream.scala Thu May 05 16:26:07 2016 +0200 @@ -23,9 +23,10 @@ import DefaultJsonProtocol._ implicit val changesFormat = jsonFormat3(ResultRow) - def apply(entity: HttpEntity): Deserialized[ResultRow] = (Try { - Right(JsonParser(entity.asString).asJsObject.convertTo[ResultRow]) - }).getOrElse(Left(MalformedContent("bad json"))) + def apply(entity: HttpEntity): Deserialized[ResultRow] = Try { + Right(JsonParser(entity.asString(HttpCharsets.`UTF-8`)).asJsObject. + convertTo[ResultRow]) + } getOrElse Left(MalformedContent("bad json")) } }