
Description
Hi,
I was trying out your scala-redis library for my project. I encountered problems when inserting unicode strings into redis database.
Some of the unicode strings are not inserted at all, some of them are getting inserted but only a part of it. I tried with my scala interpreter too. At one point it just give array index out of bounds exception or it hangs (infinite loop or something). I have dumped the errors below.
Please let me know, if you have any suggestions or fixes for this.
I appreciate any kind of input.
Thank you.
Sincerely,
Anandan Rangasamy.
Here's the dump:
//one part of it
scala> val r = new Redis()
r: com.redis.Redis = localhost:6379 connected:true
scala> r.pushHead("Aäko","Aäkon Këëtrëh")
res7: Boolean = true
scala> r.listLength("Aäko")
res8: Option[Int] = None
//another one
scala> val r = new Redis()
r: com.redis.Redis = localhost:6379 connected:true
scala> r.listLength("Aäko")
res6: Option[Int] = Some(2)
scala> r.listRange("Aäko",0,1)
java.lang.ArrayIndexOutOfBoundsException: 1
at com.redis.SocketOperations$class.bulkReply(SocketOperations.scala:152)
at com.redis.Connection.bulkReply(Connection.scala:8)
at com.redis.SocketOperations$$anonfun$listReply$1.apply(SocketOperations.scala:171)
at com.redis.SocketOperations$$anonfun$listReply$1.apply(SocketOperations.scala:170)
at scala.Range.foreach(Range.scala:44)
...
scala> r.listRange("Aal",0,1)
res1: Option[List[String]] = Some(List(Aal, Aalacho))
scala> r.listRange("Aän",0,1)
res2: Option[List[String]] = None
scala> r.listRange("Aan",0,-1)
res3: Option[List[String]] = Some(List(Aan, Aantar Lee Coates, Aantonio ZZ))
scala> r.listRange("Aäkon",0,-1)
java.lang.ArrayIndexOutOfBoundsException: 1
at com.redis.SocketOperations$class.bulkReply(SocketOperations.scala:152)
at com.redis.Connection.bulkReply(Connection.scala:8)
at com.redis.SocketOperations$$anonfun$listReply$1.apply(SocketOperations.scala:171)
at com.redis.SocketOperations$$anonfun$listReply$1.apply(SocketOperations.scala:170)
at scala.Range.foreach(Range.scala:44)
// anothe one, where it hangs (probably an infinite loop or something)
scala> import com.redis._
import com.redis._
scala> val r = new Redis()
r: com.redis.Redis = localhost:6379 connected:true
scala> r.listLength("Aäkon1")
res0: Option[Int] = Some(1)
scala> r.listRange("Aäkon1",0,-1)