encodeCookieValue

Encode cookie value using the specified encoding