title: Can I (and if I can, how do I) enforce a specific string encoding for running lua scripts with jedis?
body: <p>I suspect that jedis decodes my string to the wrong byte set before calling my lua script. Can I configure which string encoding/decoding algorithm or function is used?</p>
  
  <p><strong><em>Context</em></strong></p>
  
  <p>I'm calling a lua script from jedis, somewhat like so:</p>
  
  <pre><code>evalResponse = jedis.eval(aLuaScriptString, 1, someKey, Double.toString(aDouble), new String(aByteArray, ‘UTF-8’), Integer.toString(anInteger));
  </code></pre>
  
  <p>where the lua script performs a zadd:</p>
  
  <pre><code>redis.call('zadd', KEYS[1], ARGV[1], ARGV[2])
  </code></pre>
  
  <p>When I retrieve the byteArray from redis, it contains a different set of bytes than the ones I sent in.</p>
  
  <p>Since the string representations of the retrieved bytes, and the bytes I'm sending in are identical, I strongly suspect that somewhere along the jedis/lua invocation path my string is decoded to bytes differently than how I encoded it. </p>