how to encode keywords