4 Replies Latest reply on Dec 10, 2017 6:11 AM by Wolfram Huesken

    Memcached Module and UTF-8

    Wolfram Huesken Newbie

      I just tried to use memcached to write and read back a key which contains UTF-8:


      String key = "dorothy-perkins-angela-仿麂皮粗跟靴-褐色";

      mc.set(key, 0, "test");

      log.info("Key: {}", mc.get(key));


      2017-11-23 18:28:41.378  INFO 10771 --- [  XNIO-1 task-1] c.z.a.b.h.SpeaksMemcachedHealthIndicator : Key: null


      I also have JDBC Store attached, so I can see that the key is written properly:


      MariaDB [aloha]> SELECT id, LENGTH(id) FROM aloha_memcachedCache WHERE id LIKE 'dorothy%' LIMIT 1;


      | id                                               | LENGTH(id) |


      | dorothy-perkins-angela-仿麂皮粗跟靴-褐色           |         48 |



      So I assume that the problem is when the key is fetched... Does anyone know how I could fix this or if there is a workaround?


      I'm using the latest Infinispan release:

      ISPN000128: Infinispan version: Infinispan 'Bastille' 9.1.3.Final