Encode keys to ascii before passing on to memcached.