encode the option value

Signed-off-by: somnath <somnath@runwalsoft.com>