Encoding on search strings